mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Ruby squiggly heredoc.
This commit is contained in:
parent
51df390edc
commit
fb489d416f
2 changed files with 9 additions and 1 deletions
|
|
@ -179,7 +179,7 @@ export const language = <ILanguage>{
|
|||
[/@@[\w]*/, 'namespace.class.identifier'], // class
|
||||
|
||||
// here document
|
||||
[/<<-(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/[ \t\r\n]+<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
[/^<<(@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
|
||||
|
|
|
|||
|
|
@ -134,5 +134,13 @@ testTokenization('ruby', [
|
|||
{ startIndex: 0, type: 'identifier.ruby' },
|
||||
{ startIndex: 1, type: 'string.heredoc.delimiter.ruby' }
|
||||
]
|
||||
}],
|
||||
|
||||
[{
|
||||
line: 'x<<~HERE',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'identifier.ruby' },
|
||||
{ startIndex: 1, type: 'string.heredoc.delimiter.ruby' }
|
||||
]
|
||||
}]
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue