This commit is contained in:
Alex Dima 2021-05-10 16:45:17 +02:00
parent 0500e21d95
commit d6197d6e14
No known key found for this signature in database
GPG key ID: 6E58D7B045760DA0
2 changed files with 26 additions and 1 deletions

View file

@ -449,5 +449,30 @@ testTokenization('yaml', [
}
]
}
],
[
{
line:
"text: Pretty vector drawing. #this is comment doesn't have proper syntax higlighting",
tokens: [
{ startIndex: 0, type: 'type.yaml' },
{ startIndex: 4, type: 'operators.yaml' },
{ startIndex: 5, type: 'white.yaml' },
{ startIndex: 6, type: 'string.yaml' },
{ startIndex: 29, type: 'comment.yaml' }
]
}
],
[
{
line: "number: 3 #this comment also doesn't have proper syntax highlighting",
tokens: [
{ startIndex: 0, type: 'type.yaml' },
{ startIndex: 6, type: 'operators.yaml' },
{ startIndex: 7, type: 'white.yaml' },
{ startIndex: 8, type: 'string.yaml' },
{ startIndex: 10, type: 'comment.yaml' }
]
}
]
]);

View file

@ -84,7 +84,7 @@ export const language = <languages.IMonarchLanguage>{
// String nodes
[
/.+$/,
/[^#]+/,
{
cases: {
'@keywords': 'keyword',