Browse files

Grammar: Be strict on what can start an HTML tag

Previously any `<` would start a tag which caused false positives.
  • Loading branch information...
1 parent 484d468 commit 5276d7a93f0cf53b7d425c39c6968b09ea9f2d40 @infininight infininight committed Feb 10, 2015
Showing with 8 additions and 0 deletions.
  1. +8 −0 Syntaxes/JavaDoc.tmLanguage
View
8 Syntaxes/JavaDoc.tmLanguage
@@ -406,6 +406,14 @@
<string>#inline-formatting</string>
</dict>
<dict>
+ <key>comment</key>
+ <string>This prevents &lt; characters in commented source from starting
+ a tag that will not end. List of allowed tags taken from
+ java checkstyle.</string>
+ <key>match</key>
+ <string>&lt;(?!(a|abbr|acronym|address|area|b|bdo|big|blockquote|br|caption|cite|code|colgroup|dd|del|div|dfn|dl|dt|em|fieldset|font|h1toh6|hr|i|img|ins|kbd|li|ol|p|pre|q|samp|small|span|strong|sub|sup|table|tbody|td|tfoot|th|thread|tr|tt|u|ul)\b[^&gt;]*&gt;)</string>
+ </dict>
+ <dict>
<key>include</key>
<string>text.html.basic</string>
</dict>

0 comments on commit 5276d7a

Please sign in to comment.