Skip to content

Commit

Permalink
Grammar: Be strict on what can start an HTML tag
Browse files Browse the repository at this point in the history
Previously any `<` would start a tag which caused false positives.
  • Loading branch information
infininight committed Feb 11, 2015
1 parent 484d468 commit 5276d7a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Syntaxes/JavaDoc.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,14 @@
<key>include</key>
<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>
Expand Down

0 comments on commit 5276d7a

Please sign in to comment.