Skip to content

Commit

Permalink
added check, that the first block token is lf
Browse files Browse the repository at this point in the history
  • Loading branch information
de-code committed Feb 15, 2021
1 parent d79baaa commit 6911ef2
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ public void testShouldOutputBlockStartForRegularBlock() throws Exception {
public void testShouldOutputBlockStartForBlockStartingWithLineFeed() throws Exception {
String blockText = "\nThis is a block";
Document doc = Document.createFromText(blockText);
assertThat(
"doc.block[0].tokens[0].text",
doc.getBlocks().get(0).getTokens().get(0).getText(),
is("\n")
);
SortedSet<DocumentPiece> documentParts = getWholeDocumentParts(doc);
Pair<String, LayoutTokenization> dataAndTokens = FullTextParser.getBodyTextFeatured(doc, documentParts);
LOGGER.debug("data debug: {}", dataAndTokens.getLeft());
Expand Down

0 comments on commit 6911ef2

Please sign in to comment.