Permalink
Browse files

Only highlight trailing whitespace if it is preceded by a non-whitesp…

…ace character.


Fixes mads-hartmann#7
  • Loading branch information...
arkadyan committed Apr 17, 2012
1 parent 84ba447 commit ac6082c8f97a5e6ea8340d81161b060444f45aaf
Showing with 9 additions and 3 deletions.
  1. +9 −3 Syntaxes/Trailing Whitespace.tmLanguage
@@ -11,10 +11,16 @@
<key>patterns</key>
<array>
<dict>
+ <key>captures</key>
+ <dict>
+ <key>3</key>
+ <dict>
+ <key>name</key>
+ <string>invalid.illegal.whitespace.trailing</string>
+ </dict>
+ </dict>
<key>match</key>
- <string>([^\S\n\f\r]+)$</string>
- <key>name</key>
- <string>invalid.illegal.whitespace.trailing</string>
+ <string>((\S)([^\S\n\f\r]+)$)</string>
</dict>
</array>
<key>uuid</key>

0 comments on commit ac6082c

Please sign in to comment.