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

Lua lexer handles escape string in regex incorrectly #1401

Closed
VADemon opened this issue Jan 21, 2020 · 0 comments · Fixed by #1403
Closed

Lua lexer handles escape string in regex incorrectly #1401

VADemon opened this issue Jan 21, 2020 · 0 comments · Fixed by #1403
Assignees
Labels
bugfix-request A request for a bugfix to be developed.

Comments

@VADemon
Copy link

VADemon commented Jan 21, 2020

Lua

Code sample:

if
	url = url:gsub("^['\"]", ""):gsub("['\"]$", "")
end

All lines following the reg expression are considered to be part of a string (e.g. the "end" statement). This regex probably triggers a bug in string_escape

Looks like Github's highlighter doesn't have this problem ;)

Screenshots
Above code sample

Additional context
As seen on Gitlab (if I'm not mistaken it uses rouge): code link

@VADemon VADemon added the bugfix-request A request for a bugfix to be developed. label Jan 21, 2020
@pyrmont pyrmont self-assigned this Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix-request A request for a bugfix to be developed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants