24 lines
1.4 KiB
Text
24 lines
1.4 KiB
Text
|
## Here is a short improved example for HTML.
|
||
|
##
|
||
|
syntax "html5" "\.htm[l]?$"
|
||
|
header "<!DOCTYPE html5>"
|
||
|
|
||
|
#Lint an invalid tag.
|
||
|
color error "<[^!].*?>"
|
||
|
color symbol.tag "(?i)<[/]?(a|a(bbr|ddress|rea|rticle|side|udio)|b|b(ase|d(i|o)|lockquote|r|utton)|ca(nvas|ption)|center|cite|co(de|l|lgroup)|d(ata|atalist|d|el|etails|fn|ialog|l|t)|em|embed|fieldset|fig(caption|ure)|form|iframe|h[1-6]|hr|i|img|in(put|s)|kbd|keygen|label|legend|li|link|ma(in|p|rk)|menu|menuitem|met(a|er)|nav|noscript|o(bject|l|pt(group|ion)|utput)|p|param|picture|pre|progress|q|r(p|t|uby)|s|samp|se(ction|lect)|small|source|span|strong|su(b|p|mmary)|textarea|time|track|u|ul|var|video|wbr)( .*)*?>"
|
||
|
color symbol.tag.extended "(?i)<[/]?(body|div|html|head(er)?|footer|title|table|t(body|d|h(ead)?|r|foot))( .*)*?>"
|
||
|
color preproc "(?i)<[/]?(script|style)( .*)*?>"
|
||
|
color special "&[^;[[:space:]]]*;"
|
||
|
color symbol "[:=]"
|
||
|
color identifier "(alt|bgcolor|height|href|id|label|longdesc|name|on(click|focus|load|mouseover)|size|span|src|style|target|type|value|width)="
|
||
|
color constant.string ""[^"]*""
|
||
|
color constant.number "(?i)#[0-9A-F]{6,6}"
|
||
|
#Don't want or need tag highlighting outside of a tag! :)
|
||
|
color default start=">" end="<"
|
||
|
color symbol.tag "<|>"
|
||
|
color constant.string.url "(ftp(s)?|http(s)?|git|chrome)://[^ ]+"
|
||
|
color comment "<!--.+?-->"
|
||
|
color preproc "<!DOCTYPE.+?>"
|
||
|
|
||
|
# There's only so much we can do before regions and includes are implemented. :/
|