diff --git a/src/liquid/liquid.ts b/src/liquid/liquid.ts index 9bad701b..06a3b3f2 100644 --- a/src/liquid/liquid.ts +++ b/src/liquid/liquid.ts @@ -167,9 +167,9 @@ export const language = { [/\{\%\s*comment\s*\%\}/, 'comment.start.liquid', '@comment'], [/\{\{/, { token: '@rematch', switchTo: '@liquidState.root' }], [/\{\%/, { token: '@rematch', switchTo: '@liquidState.root' }], - [/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], + [/(<)([\w\-]+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], - [/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], + [/(<\/)([\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], [/{ [/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }], [/)/, ['delimiter.html', 'tag.html', 'delimiter.html']], + [/(<)([\w\-]+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], [/(<)(script)/, ['delimiter.html', { token: 'tag.html', next: '@script' }]], [/(<)(style)/, ['delimiter.html', { token: 'tag.html', next: '@style' }]], - [/(<)([:\w]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], - [/(<\/)(\w+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], + [/(<)([:\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], + [/(<\/)([\w\-]+)/, ['delimiter.html', { token: 'tag.html', next: '@otherTag' }]], [/{ [/'([^']*)'/, 'string.cs'], // simple html - [/(<)(\w+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], - [/(<)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], - [/(<\/)(\w+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], + [/(<)([\w\-]+)(\/>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], + [/(<)([\w\-]+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], + [/(<\/)([\w\-]+)(>)/, ['delimiter.html', 'tag.html', 'delimiter.html']], // delimiters [/[\+\-\*\%\&\|\^\~\!\=\<\>\/\?\;\:\.\,]/, 'delimiter.cs'],