diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e43b0f9 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.DS_Store diff --git a/Itemizers/HTML5.xml b/Itemizers/HTML5.xml new file mode 100644 index 0000000..08107c6 --- /dev/null +++ b/Itemizers/HTML5.xml @@ -0,0 +1,56 @@ + + + + + ESCommentItem + html.comment.conditional:has-child(conditional.start:has-child(condition:capture(name))) + + + + + + + ESCommentItem + html.comment + + + + + + + html.tag.open:has-child(name[text='datalist']:capture(name)) + html.tag.close:has-child(name[text == $name.text]) + + + html.tag.open:has-child(name[text='option']:capture(name)) + ESXHTMLItem + + + + ESXHTMLItem + + + + html.tag.open:has-child(name:capture(name)) + html.tag.close:has-child(name[text == $name.text]) + + + + ESXHTMLItem + + + + html.tag.open:has-child(name:capture(name), empty-element-marker), html.tag.self-closing:has-child(name:capture(name)), html.tag.open:has-child(name:capture(name), self-closing) + ESXHTMLItem + + + + + + diff --git a/Languages.xml b/Languages.xml index 2b8e2b4..3cbd3cf 100644 --- a/Languages.xml +++ b/Languages.xml @@ -8,4 +8,15 @@ 0.1 git://github.com/minimalweb/HTML5.sugar.git + + language-root.html + HTML5 + + html + htm + shtml + shtm + xhtml + + \ No newline at end of file diff --git a/Syntaxes/HTML5Syntax.xml b/Syntaxes/HTML5Syntax.xml new file mode 100644 index 0000000..af647e2 --- /dev/null +++ b/Syntaxes/HTML5Syntax.xml @@ -0,0 +1,317 @@ + + + + + + <!-- + + + + --> + + + + + + (<!)(?i:DOCTYPE) + + + + + > + + + + + + (?=<(?i:style)) + + + (</)((?i:style))(>) + + + + + + + + + (<)((?i:style)) + + + + + (/?)(>) + + + + + + + + + + (?<=>)\s*(<!--)? + + + + (-->\s*)?(?=</(?i:style)>) + + + + + + + + + + + (?=<(?i:script)) + + + (</)((?i:script))(>) + + + + + + + + + (<)((?i:script)) + + + + + (/?)(>) + + + + + + + + + + (?<=>)\s*(<!--)? + + + + ((?://)?\s*(?:-->|]]>)\s*)?(?=</(?i:script)>) + + + + + + + + + + + + + + + + + (<)(address|article|aside|audio|blockquote|body|canvas|caption|center|colgroup|dd|details|dir|div|dl|dt|embed|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hgroup|html|iframe|li|map|menu|noframes|noscript|object|ol|output|p|pre|progress|samp|section|table|tbody|td|textarea|tfoot|th|thead|title|tr|ul|video)\b + + + + + (/?)(>) + + + + + + + + + + (</)(address|article|aside|audio|blockquote|body|canvas|caption|center|colgroup|dd|details|dir|div|dl|dt|embed|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hgroup|html|iframe|li|map|menu|noframes|noscript|object|ol|output|p|pre|progress|samp|section|table|tbody|td|textarea|tfoot|th|thead|title|tr|ul|video)\b + + + + + (>) + + + + + + (<)(a|abbr|acronym|big|cite|code|dfn|command|em|font|i|kbd|mark|meter|nav|q|s|small|span|strike|strong|sub|summary|sup|time|tt|u|var)\b + + + + + (/?)(>) + + + + + + + + + + (</)(a|abbr|acronym|big|cite|code|dfn|command|em|font|i|kbd|mark|meter|nav|q|s|small|span|strike|strong|sub|summary|sup|time|tt|u|var)\b + + + + + (>) + + + + + + (<)(base|img|br|link|meta|hr|input|command|col|wbr|source|track) + + + + + (/?)(>) + + + + + + + + + + (<)([a-zA-Z:_]+[a-zA-Z:_0-9.-]*) + + + + + (/?)(>) + + + + + + + + + + (</)([a-zA-Z:_]+[a-zA-Z:_0-9.-]*) + + + + + (>) + + + + + + + ((&)(?:[a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;))|(&) + + + + + + + + + + + + \s+(id)(=)((")([^"]*)(")|(')([^']*)('))|\s+(class)(=)((")([^"]*)(")|(')([^']*)(')) + + + + + + + + + + + + + + + + + + + + + + + + + \s+(style)(=)((")([^"]*)(")|(')([^']*)('))|\s+(on[a-zA-Z]+)(=)((")(.*?)((?<!\\)")|(')(.*?)((?<!\\)'))|\s+([-_a-zA-Z0-9:]+)(=) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ([^:]+)(:)(.*) + + + + + + + + + + + + + + + ("|') + + + + \1 + + + + + + + \ No newline at end of file