mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
New rule for non-teminated string in yaml
This commit is contained in:
parent
66b5497f3c
commit
c59dd6a01e
2 changed files with 11 additions and 0 deletions
|
|
@ -145,6 +145,15 @@ testTokenization('yaml', [
|
||||||
}]
|
}]
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
//String
|
||||||
|
[{
|
||||||
|
line: '\'\'\'',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'string.yaml' },
|
||||||
|
{ startIndex: 2, type: 'string.invalid.yaml' },
|
||||||
|
]
|
||||||
|
}],
|
||||||
|
|
||||||
// Block Scalar
|
// Block Scalar
|
||||||
[{
|
[{
|
||||||
line: '>',
|
line: '>',
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,8 @@ export const language = <ILanguage>{
|
||||||
|
|
||||||
// Start Flow Scalars (quoted strings)
|
// Start Flow Scalars (quoted strings)
|
||||||
flowScalars: [
|
flowScalars: [
|
||||||
|
[/"([^"\\]|\\.)*$/, 'string.invalid'],
|
||||||
|
[/'([^'\\]|\\.)*$/, 'string.invalid'],
|
||||||
[/"/, 'string', '@string."'],
|
[/"/, 'string', '@string."'],
|
||||||
[/'/, 'string', '@string.\'']
|
[/'/, 'string', '@string.\'']
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue