Tags: Add support for dash and fix colon in end tag

This commit is contained in:
AndersMad 2017-03-29 12:08:42 +02:00
parent eb82671c37
commit 4e97f005e6

View file

@ -76,11 +76,11 @@ export var language = <ILanguage> {
root: [ root: [
[/<!DOCTYPE/, 'metatag', '@doctype'], [/<!DOCTYPE/, 'metatag', '@doctype'],
[/<!--/, 'comment', '@comment'], [/<!--/, 'comment', '@comment'],
[/(<)(\w+)(\/>)/, [htmlTokenTypes.DELIM_START, 'tag', htmlTokenTypes.DELIM_END]], [/(<)((?:[\w\-]+:)?[\w\-]+)(\s*)(\/>)/, [htmlTokenTypes.DELIM_START, 'tag', '', htmlTokenTypes.DELIM_END]],
[/(<)(script)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@script'} ]], [/(<)(script)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@script'} ]],
[/(<)(style)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@style'} ]], [/(<)(style)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@style'} ]],
[/(<)([:\w]+)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@otherTag'} ]], [/(<)((?:[\w\-]+:)?[\w\-]+)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@otherTag' }]],
[/(<\/)(\w+)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@otherTag' }]], [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@otherTag' }]],
[/</, htmlTokenTypes.DELIM_START], [/</, htmlTokenTypes.DELIM_START],
[/[^<]+/], // text [/[^<]+/], // text
], ],