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

Fix bug in parsing of comments. #2609

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

Conversation

acoglio
Copy link
Contributor

@acoglio acoglio commented Feb 12, 2025

When parsing a line comment // ... that ends without a newline (because it ends with the input), the parser was neglecting to ensure that there are no unsafe characters in the comment. This commit adds that check, and also adds a test that would fail without this fix.

Also improve and fix some documentation comments in the code, both in the file that was fixed and in a couple of other files.

When parsing a line comment `// ...` that ends without a newline (because it
ends with the input), the parser was neglecting to ensure that there are no
unsafe characters in the comment. This commit adds that check, and also adds a
test that would fail without this fix.

Also improve and fix some documentation comments in the code, both in the file
that was fixed and in a couple of other files.
@vicsn
Copy link
Collaborator

vicsn commented Feb 12, 2025

CC @mikebenfield can't add you as reviewer, but please do :)

Copy link
Contributor

@bendyarm bendyarm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor rewording to make it clear there are two kinds of newlines, not three.

Co-authored-by: Eric McCarthy <[email protected]>
Signed-off-by: Alessandro Coglio <[email protected]>
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.

3 participants