Skip to content

fix: remove initial hash from comments#54

Closed
fzipi wants to merge 1 commit into
mainfrom
fix/remove-hashtag-comments
Closed

fix: remove initial hash from comments#54
fzipi wants to merge 1 commit into
mainfrom
fix/remove-hashtag-comments

Conversation

@fzipi
Copy link
Copy Markdown
Member

@fzipi fzipi commented Sep 2, 2025

what

  • remove the initial # from text in comments. Maybe we can also strip the whitespace?

why

  • do not carry the comment start to other languages

Signed-off-by: Felipe Zipitria <felipe.zipitria@owasp.org>
Comment thread g4/SecLangLexer.g4
COMMENT
: ('#' .*? '\r'? '\n')+ '\n'?
: '#' ~[\r\n]* ('\r'? '\n' | EOF)
;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe it is a good idea to move COMMENT to a new mode COMMENT_MODE, triggered by something like COMMENT_START: '#' ' '?. Note that this change implies that COMMENT_START should be placed before the "comment" event in the parser file.

@fzipi fzipi closed this Nov 23, 2025
@Agustindeleon Agustindeleon deleted the fix/remove-hashtag-comments branch November 23, 2025 20:42
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.

2 participants