mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 20:52:56 +01:00
This commit is contained in:
parent
6a4cd5fe25
commit
60477286f3
2 changed files with 18 additions and 0 deletions
|
|
@ -223,5 +223,21 @@ testTokenization('dockerfile', [
|
|||
{ startIndex: 45, type: 'string.dockerfile' }
|
||||
]
|
||||
}
|
||||
],
|
||||
[
|
||||
{
|
||||
line: "RUN \\'e\\'",
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'keyword.dockerfile' },
|
||||
{ startIndex: 3, type: '' }
|
||||
]
|
||||
},
|
||||
{
|
||||
line: 'RUN echo hi this is # not a comment',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'keyword.dockerfile' },
|
||||
{ startIndex: 3, type: '' }
|
||||
]
|
||||
}
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -99,6 +99,8 @@ export const language = <languages.IMonarchLanguage>{
|
|||
|
||||
// Recognize strings, including those broken across lines with \ (but not without)
|
||||
strings: [
|
||||
[/\\'$/, '', '@popall'], // \' leaves @arguments at eol
|
||||
[/\\'/, ''], // \' is not a string
|
||||
[/'$/, 'string', '@popall'],
|
||||
[/'/, 'string', '@stringBody'],
|
||||
[/"$/, 'string', '@popall'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue