You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Syntax highlighting issue with POSIX bracket expressions in regexes #228
Yes, I was reading everything and was about to ask. The POSIX expression should get both brackets highlighted, so this is probably something that goes beyond parsing of escape sequences.
I think the provided regex is wrong: [[[:alpha:]]\d]+ The Ruby regexp engine is lenient and it allows such regexp but it's treated as [[:alpha:]]. This is a non-standard scenario, not sure if this is something that should be fixed in the regex tree-sitter grammar.
Activity
vitallium commentedon Jan 6, 2026
Thanks for reporting! This looks like an issue with the
tree-sittergrammar. I've created an issue in upstream and will push a fix for it later.callmesangio commentedon Jan 6, 2026
Awesome, thanks!
vitallium commentedon Jan 6, 2026
I've opened a pull request with a fix: tree-sitter/tree-sitter-ruby#285
vitallium commentedon Jan 6, 2026
vitallium commentedon Jan 6, 2026
Oh, wait. I think there is another issue with POSIX expressions.
callmesangio commentedon Jan 6, 2026
Yes, I was reading everything and was about to ask. The POSIX expression should get both brackets highlighted, so this is probably something that goes beyond parsing of escape sequences.
vitallium commentedon Jan 6, 2026
I think the provided regex is wrong:
[[[:alpha:]]\d]+The Ruby regexp engine is lenient and it allows such regexp but it's treated as[[:alpha:]]. This is a non-standard scenario, not sure if this is something that should be fixed in theregextree-sitter grammar.callmesangio commentedon Jan 6, 2026
Apparently the two regexes behave differently though, I don't think they're equivalent: