mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 17:25:39 +01:00
Fix ': ' within a comment
This commit is contained in:
parent
c7ce77ba18
commit
788b6a2982
2 changed files with 35 additions and 2 deletions
|
|
@ -633,5 +633,38 @@ testTokenization('yaml', [
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
// ': ' in Comment following Value
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: 'key: value #comment: also comment',
|
||||||
|
tokens: [
|
||||||
|
{
|
||||||
|
startIndex: 0,
|
||||||
|
type: 'type.yaml'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startIndex: 3,
|
||||||
|
type: 'operators.yaml'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startIndex: 4,
|
||||||
|
type: 'white.yaml'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startIndex: 5,
|
||||||
|
type: 'string.yaml'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startIndex: 10,
|
||||||
|
type: 'white.yaml'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
startIndex: 11,
|
||||||
|
type: 'comment.yaml'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
]
|
]
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
[/@numberDate(?![ \t]*\S+)/, 'number.date'],
|
[/@numberDate(?![ \t]*\S+)/, 'number.date'],
|
||||||
|
|
||||||
// Key:Value pair
|
// Key:Value pair
|
||||||
[/(".*?"|'.*?'|[^'"]*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
|
[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/, ['type', 'white', 'operators', 'white']],
|
||||||
|
|
||||||
{ include: '@flowScalars' },
|
{ include: '@flowScalars' },
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue