Skip to content

Commit

Permalink
Improve Clay, Autohotkey lexers. (#2248)
Browse files Browse the repository at this point in the history
Merge consecutive tokens together where possible.
  • Loading branch information
Anteru committed Sep 25, 2022
1 parent f4a5d40 commit fafb6d7
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 106 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ Version 2.14.0
(#2223)

- Support more filetypes and compression types in `autopygmentize` (#2219)
- Merge consecutive tokens in Autohotkey, Clay

Version 2.13.0
--------------
Expand Down
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 fafb6d7

Please sign in to comment.