Skip to content

Commit

Permalink
✨ Grammar: Use PCRE compatible regex
Browse files Browse the repository at this point in the history
This change fixes the syntax highlighting on GitHub.
  • Loading branch information
sanssecours committed Nov 4, 2016
1 parent d87cd81 commit 0042b3d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions Syntaxes/ABNF.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
<key>comment</key>
<dict>
<key>begin</key>
<string>(?:(?&lt;leading-whitespace&gt;^[ \t]*)|[ \t]*)(?=;\p{Print}*$)</string>
<string>(?:(?&lt;whitespace&gt;^[ \t]*)|[ \t]*)(?=;[[:print:]]*$)</string>
<key>beginCaptures</key>
<dict>
<key>leading-whitespace</key>
<key>whitespace</key>
<dict>
<key>name</key>
<string>punctuation.whitespace.comment.leading.abnf</string>
Expand Down Expand Up @@ -112,7 +112,7 @@
</dict>
</array>
</dict>
<key>numbers-concat</key>
<key>numbers</key>
<dict>
<key>patterns</key>
<array>
Expand All @@ -131,7 +131,7 @@
# - dash followed by last number of range, or
# - sequence of additional numbers separated by dot
(?:(?:(?=-)(?&lt;dash&gt;-)(?&lt;last&gt;\w+)) |
(?&lt;numbers-concat&gt;[\w.]+))?</string>
(?&lt;numbers&gt;[\w.]+))?</string>
<key>name</key>
<string>constant.numeric.binary.abnf</string>
</dict>
Expand Down Expand Up @@ -164,7 +164,7 @@
</dict>
</array>
</dict>
<key>numbers-concat</key>
<key>numbers</key>
<dict>
<key>patterns</key>
<array>
Expand All @@ -179,7 +179,7 @@
<string>(?x)%d
(?&lt;number&gt;[^\s.-]+)
(?:(?:(?=-)(?&lt;dash&gt;-)(?&lt;last&gt;\w+)) |
(?&lt;numbers-concat&gt;[\w.]+))?</string>
(?&lt;numbers&gt;[\w.]+))?</string>
<key>name</key>
<string>constant.numeric.decimal.abnf</string>
</dict>
Expand Down Expand Up @@ -212,7 +212,7 @@
</dict>
</array>
</dict>
<key>numbers-concat</key>
<key>numbers</key>
<dict>
<key>patterns</key>
<array>
Expand All @@ -227,7 +227,7 @@
<string>(?x)%x
(?&lt;number&gt;[^\s.-]+)
(?:(?:(?=-)(?&lt;dash&gt;-)(?&lt;last&gt;\w+)) |
(?&lt;numbers-concat&gt;[\w.]+))?</string>
(?&lt;numbers&gt;[\w.]+))?</string>
<key>name</key>
<string>constant.numeric.hex.abnf</string>
</dict>
Expand Down Expand Up @@ -307,7 +307,7 @@
<key>digit-hex-valid</key>
<dict>
<key>match</key>
<string>\h</string>
<string>[0-9A-Fa-f]</string>
</dict>
<key>digits-binary-concatenation</key>
<dict>
Expand Down

0 comments on commit 0042b3d

Please sign in to comment.