-
Notifications
You must be signed in to change notification settings - Fork 297
Closed
Description
The TextCollectingVisitor appears to have inconsistent behaviour with IndentedCodeBlock vs FencedCodeBlock.
The former doesn't have its text collected at all while the latter does but drops line breaks before hand.
To reproduce, run the following code using version 0.64.4:
final String markdown = "" +
"Introductory para:\n" +
"\n" +
"```\n" +
"Fenced\n" +
"```\n" +
"\n" +
" Indented\n" +
"\n";
String text = new TextCollectingVisitor().collectAndGetText(Parser.builder().build().parse(markdown));
System.out.println(text);The surprising result of this is to print out the following, notably with Fenced coalesced onto the previous line and Indented omitted entirely:
Introductory para:Fenced
I would expect that the TextCollectingVisitor would both pieces of text, with newlines intact:
Introductory para:
Fenced
Indented
Metadata
Metadata
Assignees
Labels
No labels