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

Syntax highlight of Ruby is broken on percent notations #140

Open
alexr00 opened this issue Nov 24, 2021 · 2 comments
Open

Syntax highlight of Ruby is broken on percent notations #140

alexr00 opened this issue Nov 24, 2021 · 2 comments

Comments

@alexr00
Copy link

alexr00 commented Nov 24, 2021

Originally from @takaram in microsoft/vscode#137713

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.62.3, 1.63.0-insider
  • OS Version: Windows_NT x64 10.0.19042

Steps to Reproduce:

  1. Create .rb file
  2. Input code like below
puts %(() parentheses)
puts %<{} braces>
puts %Q{[] brackets}
puts %r[[^a-z]]
puts %(
  def foo()
    puts 123
  rescue
    nil
  end
)
puts %x(echo '() parentheses')

Expected:
The literal is recognized as strings (or regexp) until the closing bracket.
Specification of Ruby percent notations: http://www.chrisrolle.com/en/blog/ruby-percentage-notations

Actual:
image

@RedCMD
Copy link

RedCMD commented Nov 20, 2023

@alexr00 This issue is actually caused by a VSCode textmate bug

microsoft/vscode-textmate#140

Nested 'repository"'s only seem to work if there is no "match" or "begin" rule at the same level as it
(or "include" if they are inside a "patterns" array vs a "repository" item)

a temp work around is to nest everything except the 'repository" into a "patterns" array
image

<key>percent_literals</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>%i(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.array.symbol.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\&lt;|\\&gt;</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\{|\\\}</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\[|\\\]</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\(|\\\)</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>symbol</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\\|\\[ ]</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\S\w*</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%I(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.array.symbol.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#symbol</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>symbol</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?=\\|#\{)</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\S\w*</string>
<key>name</key>
<string>constant.other.symbol.ruby</string>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%q(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\&lt;|\\&gt;|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\{|\\\}|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\[|\\\]|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\(|\\\)|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%Q?(?:([(\[{&lt;])|([^\w\s=]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.quoted.other.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%r(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>([)\]}&gt;]\2|\1\2)[eimnosux]*</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.regexp.percent.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#regex_sub</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%s(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.constant.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>constant.other.symbol.percent.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\&lt;|\\&gt;|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\{|\\\}|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\[|\\\]|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>\\\(|\\\)|\\\\</string>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%w(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.array.string.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\&lt;|\\&gt;</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\{|\\\}</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\[|\\\]</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\(|\\\)</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>string</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>constant.character.escape.ruby</string>
</dict>
</dict>
<key>match</key>
<string>\\\\|\\[ ]</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
<dict>
<key>match</key>
<string>\S\w*</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%W(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.section.array.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>meta.array.string.interpolated.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\{</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\[</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\(</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>string</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?=\\|#\{)</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>string.other.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>\S\w*</string>
<key>name</key>
<string>string.other.ruby</string>
</dict>
</array>
</dict>
</dict>
</dict>
<dict>
<key>begin</key>
<string>%x(?:([(\[{&lt;])|([^\w\s]|_))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>end</key>
<string>[)\]}&gt;]\2|\1\2</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.end.ruby</string>
</dict>
</dict>
<key>name</key>
<string>string.interpolated.percent.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>\G(?&lt;=\()(?!\))</string>
<key>end</key>
<string>(?=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\[)(?!\])</string>
<key>end</key>
<string>(?=\])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=\{)(?!\})</string>
<key>end</key>
<string>(?=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>\G(?&lt;=&lt;)(?!&gt;)</string>
<key>end</key>
<string>(?=&gt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
</array>
<key>repository</key>
<dict>
<key>angles</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>&lt;</string>
<key>end</key>
<string>&gt;</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#angles</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>braces</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>end</key>
<string>\}</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#braces</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>brackets</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\[</string>
<key>end</key>
<string>\]</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#brackets</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parens</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>end</key>
<string>\)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parens</string>
</dict>
</array>
</dict>
</array>
</dict>
</dict>
</dict>
</array>
</dict>

@alexr00
Copy link
Author

alexr00 commented Nov 21, 2023

@RedCMD thank you for root causing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants