Support hyphenated HTML tags in Markdown syntax

Signed-off-by: Remy Suen <remy.suen@gmail.com>
This commit is contained in:
Remy Suen 2021-12-30 08:00:31 -05:00
parent 25e85af033
commit be3ac39fbf
2 changed files with 50 additions and 2 deletions

View file

@ -166,7 +166,7 @@ export const language = <languages.IMonarchLanguage>{
// html tags
[/<(\w+)\/>/, 'tag'],
[
/<(\w+)/,
/<(\w+)(\-|\w)*/,
{
cases: {
'@empty': { token: 'tag', next: '@tag.$1' },
@ -174,7 +174,7 @@ export const language = <languages.IMonarchLanguage>{
}
}
],
[/<\/(\w+)\s*>/, { token: 'tag' }],
[/<\/(\w+)(\-|\w)*\s*>/, { token: 'tag' }],
[/<!--/, 'comment', '@comment']
],