Skip to content

Commit

Permalink
Revert handling of Rails options
Browse files Browse the repository at this point in the history
This change was half-baked.

With slightly different [option] patterns, like those in npm-install, we
scope some options but fail to scope some others.

I'd rather have no highlighting than inconsistent highlighting.

This reverts commit dc6bff9.
This reverts commit 323cf79.

And updates regression tests
  • Loading branch information
victor-gp committed Jan 24, 2024
1 parent 45f67db commit 36211a3
Show file tree
Hide file tree
Showing 35 changed files with 75 additions and 98 deletions.
12 changes: 0 additions & 12 deletions syntaxes/cmd-help.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ contexts:
- match: -{{option_name}}
scope: *OPTION_SCOPES
set: option-term-post
- include: rails-long-options

option-term-optional-bits:
- match: (-{{option_name}})\[({{option_name}}-)\]({{option_name}})
Expand Down Expand Up @@ -587,14 +586,3 @@ contexts:
- match: (positional arguments|optional arguments|required arguments|options):\n
scope: *SECTION_HEADING_SCOPES
set: then-pop

rails-long-options:
- match: '\[(--{{option_name}})\]'
captures:
1: *OPTION_SCOPES
set: option-term-post
- match: '\[(--{{option_name}})=({{allcaps_argument_name}})\]'
captures:
1: *OPTION_SCOPES
2: *OPTION_ARGUMENT_SCOPES
set: option-term-post
8 changes: 4 additions & 4 deletions tests/highlighted/npm-install-10.2.3.txt

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

76 changes: 38 additions & 38 deletions tests/highlighted/rails-7.0.2.2.txt

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

Loading

0 comments on commit 36211a3

Please sign in to comment.