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