diff --git a/src/basic-languages/markdown/markdown.test.ts b/src/basic-languages/markdown/markdown.test.ts
index 7253cbe6a7..9c08ec60e3 100644
--- a/src/basic-languages/markdown/markdown.test.ts
+++ b/src/basic-languages/markdown/markdown.test.ts
@@ -43,5 +43,53 @@ testTokenization('markdown', [
{ startIndex: 11, type: 'string.link.md' }
]
}
+ ],
+
+ // simple HTML content
+ [
+ {
+ line: '
content
',
+ tokens: [
+ { startIndex: 0, type: 'tag.md' },
+ { startIndex: 5, type: '' },
+ { startIndex: 12, type: 'tag.md' }
+ ]
+ }
+ ],
+
+ // hyphenated HTML tag
+ [
+ {
+ line: 'content',
+ tokens: [
+ { startIndex: 0, type: 'tag.md' },
+ { startIndex: 18, type: '' },
+ { startIndex: 25, type: 'tag.md' }
+ ]
+ }
+ ],
+
+ // unclosed HTML tag without hyphens and a trailing character
+ [
+ {
+ line: '{
// html tags
[/<(\w+)\/>/, 'tag'],
[
- /<(\w+)/,
+ /<(\w+)(\-|\w)*/,
{
cases: {
'@empty': { token: 'tag', next: '@tag.$1' },
@@ -174,7 +174,7 @@ export const language = {
}
}
],
- [/<\/(\w+)\s*>/, { token: 'tag' }],
+ [/<\/(\w+)(\-|\w)*\s*>/, { token: 'tag' }],
[/