Skip to content

Commit

Permalink
Improve single-character handling.
Browse files Browse the repository at this point in the history
Combine tokens together where possible in AutoHotkey and Clay.
  • Loading branch information
Anteru committed Sep 25, 2022
1 parent 2ea1178 commit cafc854
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 106 deletions.
4 changes: 2 additions & 2 deletions pygments/lexers/automation.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ class AutohotkeyLexer(RegexLexer):
],
'incomment': [
(r'^\s*\*/', Comment.Multiline, '#pop'),
(r'[^*/]', Comment.Multiline),
(r'[*/]', Comment.Multiline)
(r'[^*]+', Comment.Multiline),
(r'\*', Comment.Multiline)
],
'incontinuation': [
(r'^\s*\)', Generic, '#pop'),
Expand Down
2 changes: 1 addition & 1 deletion pygments/lexers/c_like.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class ClayLexer(RegexLexer):
],
'strings': [
(r'(?i)\\(x[0-9a-f]{2}|.)', String.Escape),
(r'.', String),
(r'[^\\"]+', String),
],
'nl': [
(r'\n', String),
Expand Down
38 changes: 1 addition & 37 deletions tests/examplefiles/ahk/demo.ahk.output

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

70 changes: 4 additions & 66 deletions tests/examplefiles/clay/example.clay.output

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit cafc854

Please sign in to comment.