Skip to content

Commit

Permalink
Fixed bash lexer to not highlight as a comment '#' with an escape bef…
Browse files Browse the repository at this point in the history
…ore it.
  • Loading branch information
orbitalquark committed Mar 10, 2024
1 parent 683915b commit f971ac5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lexers/bash.lua
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ lex:add_rule('string',
lex:tag(lexer.STRING, sq_str + dq_str + heredoc) + lex:tag(lexer.EMBEDDED, ex_str))

-- Comments.
lex:add_rule('comment', lex:tag(lexer.COMMENT, lexer.to_eol('#')))
lex:add_rule('comment', lex:tag(lexer.COMMENT, -B('\\') * lexer.to_eol('#')))

-- Numbers.
lex:add_rule('number', lex:tag(lexer.NUMBER, lexer.number))
Expand Down

0 comments on commit f971ac5

Please sign in to comment.