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

Encode newline with break tag #135

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

briancordanyoung
Copy link

@briancordanyoung briancordanyoung commented Nov 27, 2023

Sequential comments are currently output enclosed within a single span tag with newlines between each comment line. This results in a comments like this:

        // comment line 1
        // comment line 2
        func expressTheCommentAbove()

...being displayed in a browser as:

        // comment line 1 // comment line 2
        func expressTheCommentAbove()

This PR adds newlines to the escapingHTMLEntities() method so that these newlines are output using the <br> tag. Given this change, it may even make sense to rename this method to encodingHTMLEntities().

⚠️ All tests are passing. However, it is important to consider if there are any other cases where this behavior is not what you want. Is there any other case where a single <span> covers multiple lines and this new behavior would result in an unexpected output? ⚠️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant