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

Improve Manpage.sublime-syntax, Fix #2353 #2364

Merged
merged 2 commits into from
Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
## Bugfixes

- Bring back pre-processing of ANSI escape characters to so that some common `bat` use cases starts working again. See #2308 (@Enselic)
- Improve Manpage.sublime-syntax. See #2364 (@Freed-Wu)


# v0.22.0
Expand Down
6 changes: 3 additions & 3 deletions assets/syntaxes/02_Extra/Manpage.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ contexts:

options:
# command-line options like --option=value, --some-flag, or -x
- match: '^[ ]{7}(?=-)'
- match: '^[ ]{7}(?=-|\+)'
push: expect-command-line-option
- match: '(?:[^a-zA-Z0-9_-]|^|\s){{command_line_option}}'
captures:
Expand All @@ -96,7 +96,7 @@ contexts:
- include: env-var

expect-command-line-option:
- match: '[A-Za-z0-9-]+'
- match: '[A-Za-z0-9-\.\?:#\$\+]+'
scope: entity.name.command-line-option.man
- match: '(\[)(=)'
captures:
Expand All @@ -122,7 +122,7 @@ contexts:
pop: true

expect-parameter:
- match: '[A-Za-z0-9-]+'
- match: '[A-Za-z0-9-_]+'
scope: variable.parameter.man
- match: (?=\s+\|)
pop: true
Expand Down