Created
November 3, 2013 23:31
-
-
Save milcktoast/7296030 to your computer and use it in GitHub Desktop.
Adds GLSL syntax highlighting to inline `<script type="shader">` tags.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- Begin glsl --> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?:^\s+)?(<)((?i:script))\b(?![^>]*/>)(?=.*type=["']shader(.*)?['"])</string> | |
| <key>beginCaptures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.tag.begin.html</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.tag.template.html</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(?<=</(script|SCRIPT))(>)(?:\s*\n)?</string> | |
| <key>endCaptures</key> | |
| <dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.tag.html</string> | |
| </dict> | |
| </dict> | |
| <key>name</key> | |
| <string>source.glsl.embedded.html</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>#tag-stuff</string> | |
| </dict> | |
| <dict> | |
| <key>begin</key> | |
| <string>(?<!</(?:script|SCRIPT))(>)</string> | |
| <key>captures</key> | |
| <dict> | |
| <key>1</key> | |
| <dict> | |
| <key>name</key> | |
| <string>punctuation.definition.tag.begin.html</string> | |
| </dict> | |
| <key>2</key> | |
| <dict> | |
| <key>name</key> | |
| <string>entity.name.tag.script.html</string> | |
| </dict> | |
| </dict> | |
| <key>end</key> | |
| <string>(</)((?i:script))</string> | |
| <key>patterns</key> | |
| <array> | |
| <dict> | |
| <key>include</key> | |
| <string>source.glsl</string> | |
| </dict> | |
| </array> | |
| </dict> | |
| </array> | |
| </dict> | |
| <!-- End glsl --> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment