diff --git a/src/html.ts b/src/html.ts index 827226a1..c9ebc147 100644 --- a/src/html.ts +++ b/src/html.ts @@ -76,11 +76,11 @@ export var language = { root: [ [/)/, [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'} ]], [/(<)(style)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@style'} ]], - [/(<)([:\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' }]], + [/(<\/)((?:[\w\-]+:)?[\w\-]+)/, [htmlTokenTypes.DELIM_START, { token: 'tag', next: '@otherTag' }]], [/asd', + tokens: [ + { startIndex:0, type: DELIM_START }, + { startIndex:1, type: getTag('asdf:bar') }, + { startIndex:9, type: DELIM_END }, + { startIndex:10, type: '' }, + { startIndex:13, type: DELIM_START }, + { startIndex:15, type: getTag('asdf:bar') }, + { startIndex:23, type: DELIM_END } + ] }] ]);