Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TextCollectingVisitor works better with code blocks #575

Merged
merged 5 commits into from
May 17, 2023

Commits on May 17, 2023

  1. 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.
    roxspring committed May 17, 2023
    Configuration menu
    Copy the full SHA
    5de3794 View commit details
    Browse the repository at this point in the history
  2. 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.
    roxspring committed May 17, 2023
    Configuration menu
    Copy the full SHA
    e994ebb View commit details
    Browse the repository at this point in the history
  3. Paragraph with trailing blank line collects trailing blank line

    Consequently only a single new line is needed to add paragraph breaks
    roxspring committed May 17, 2023
    Configuration menu
    Copy the full SHA
    5358a8c View commit details
    Browse the repository at this point in the history
  4. Collect a blank line before all (except first) Block instances

    - Removed special case logic for Paragraph blocks
    - Generalised from BlankLineBreakNode case
    roxspring committed May 17, 2023
    Configuration menu
    Copy the full SHA
    8a10e15 View commit details
    Browse the repository at this point in the history
  5. IndentedCodeBlock implements TextContainer

    Implementation based on Text collectText(..) but using getContentChars()
    roxspring committed May 17, 2023
    Configuration menu
    Copy the full SHA
    cb8c9e5 View commit details
    Browse the repository at this point in the history