Skip to content

Commit

Permalink
Add support for heredocs with embedded XML
Browse files Browse the repository at this point in the history
  • Loading branch information
deepj authored and infininight committed May 30, 2017
1 parent 6628e6c commit bf1a0e5
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions Syntaxes/Ruby.plist
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,64 @@
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;[-~]("?)((?:[_\w]+_|)XML)\b\1))</string>
<key>comment</key>
<string>Heredoc with embedded xml</string>
<key>end</key>
<string>(?!\G)</string>
<key>name</key>
<string>meta.embedded.block.xml</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&gt;&lt;&lt;[-~]("?)((?:[_\w]+_|)XML)\b\1)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.string.begin.ruby</string>
</dict>
</dict>
<key>contentName</key>
<string>text.xml</string>
<key>end</key>
<string>\s*\2$\n?</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.unquoted.heredoc.ruby</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#heredoc</string>
</dict>
<dict>
<key>include</key>
<string>#interpolated_ruby</string>
</dict>
<dict>
<key>include</key>
<string>text.xml</string>
</dict>
<dict>
<key>include</key>
<string>#escaped_char</string>
</dict>
</array>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=(?&gt;&lt;&lt;[-~]("?)((?:[_\w]+_|)SQL)\b\1))</string>
Expand Down

0 comments on commit bf1a0e5

Please sign in to comment.