Skip to content

Comments

Fix MySQL lexer single comment render error#1214

Merged
alecthomas merged 1 commit intoalecthomas:masterfrom
JpMand:mysql-comments
Feb 10, 2026
Merged

Fix MySQL lexer single comment render error#1214
alecthomas merged 1 commit intoalecthomas:masterfrom
JpMand:mysql-comments

Conversation

@JpMand
Copy link
Contributor

@JpMand JpMand commented Feb 9, 2026

fixes #1213

Removing the mandatory space after -- allowed the regex to correctly parse the inline comments and avoid matching actual code on empty --

After (using chromad --csrf-key=moo):
image

new regex matches the sql.xml single comment pattern

<rule pattern="--.*\n?">

I followed the instructions on AGENTS.md for running the project, since I'm never developed with go language, am not familiar with the environment and I couldn't find a build/run instructions elsewhere (since the project seems simple to run, I guess it was not needed).

@alecthomas
Copy link
Owner

Nice, thanks!

@alecthomas alecthomas merged commit ee4ad0a into alecthomas:master Feb 10, 2026
2 checks passed
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.

MySQL lexer does not correctly render comments

2 participants