Closed roxspring closed 1 year ago
A cursory play with the debugger makes me wonder whether FencedCodeBlock
ought to implement BlankLineBreakNode
so that out.appendEol()
gets called at the start of each occurrence?
It appears that IndentedCodeBlock
doesn't play nicely because it handles content directly rather than via child Text
nodes. Maybe that implies that IndentedCodeBlock
should implement TextContainer
? I'm guessing transitioning to using Text
child nodes is a big change.
Happy to open a PR or two to address these, but might need some guidance as to the right solutions first!
The
TextCollectingVisitor
appears to have inconsistent behaviour withIndentedCodeBlock
vsFencedCodeBlock
. 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:
The surprising result of this is to print out the following, notably with
Fenced
coalesced onto the previous line andIndented
omitted entirely:I would expect that the
TextCollectingVisitor
would both pieces of text, with newlines intact: