-
Notifications
You must be signed in to change notification settings - Fork 275
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TextCollectingVisitor works better with code blocks (#575)
* Avoid duplicated setLastNode(..) call The call was happening first irrespective of whether the node was a TextContainer so lifted this logic out of the `if` block. * Avoid duplicate LineBreakNode logic It seems that currently LineBreakNode is independant of TextContainer so it seems safe to pull that out of the `if` block. * Paragraph with trailing blank line collects trailing blank line Consequently only a single new line is needed to add paragraph breaks * Collect a blank line before all (except first) Block instances - Removed special case logic for Paragraph blocks - Generalised from BlankLineBreakNode case * IndentedCodeBlock implements TextContainer Implementation based on Text collectText(..) but using getContentChars()
- Loading branch information
Showing
5 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters