Skip to content

Instantly share code, notes, and snippets.

@quackingduck
Created January 15, 2010 03:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quackingduck/24b357a08eb8f3ccca4b to your computer and use it in GitHub Desktop.
Save quackingduck/24b357a08eb8f3ccca4b to your computer and use it in GitHub Desktop.
# A comment
If line 25 of the grammar below
<string>(?:\s|^)(#).*$</string>
is changed to
<string>(?x)(?:\s|^)(#).*$</string>
the comment at the top of this file no longer matches, also
<string>(?x:(?:\s|^)(#).*$)</string>
has the same problem
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>fileTypes</key>
<array>
<string>test</string>
</array>
<key>keyEquivalent</key>
<string>^~T</string>
<key>name</key>
<string>A Test</string>
<key>patterns</key>
<array>
<dict>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.test</string>
</dict>
</dict>
<key>match</key>
<string>(?:\s|^)(#).*$</string>
<key>name</key>
<string>comment.line.number-sign.test</string>
</dict>
</array>
<key>scopeName</key>
<string>source.test</string>
<key>uuid</key>
<string>7B65BD56-B86E-43BC-AF2C-724A85387EF1</string>
</dict>
</plist>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment