mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 22:02:55 +01:00
This commit is contained in:
parent
5500b2ea0a
commit
9c57d47b94
2 changed files with 31 additions and 1 deletions
|
|
@ -828,5 +828,35 @@ testTokenization('cpp', [
|
|||
{ startIndex: 19, type: 'identifier.cpp' }
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
// https://github.com/microsoft/monaco-editor/issues/1951
|
||||
[
|
||||
{
|
||||
line: 'auto sv = R"({ "message": "Hello World" })""\\n"sv;',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: 'keyword.auto.cpp' },
|
||||
{ startIndex: 4, type: '' },
|
||||
{ startIndex: 5, type: 'identifier.cpp' },
|
||||
{ startIndex: 7, type: '' },
|
||||
{ startIndex: 8, type: 'delimiter.cpp' },
|
||||
{ startIndex: 9, type: '' },
|
||||
{ startIndex: 10, type: 'string.raw.begin.cpp' },
|
||||
{ startIndex: 13, type: 'string.raw.cpp' },
|
||||
{ startIndex: 41, type: 'string.raw.end.cpp' },
|
||||
{ startIndex: 43, type: 'string.cpp' },
|
||||
{ startIndex: 44, type: 'string.escape.cpp' },
|
||||
{ startIndex: 46, type: 'string.cpp' },
|
||||
{ startIndex: 47, type: 'identifier.cpp' },
|
||||
{ startIndex: 49, type: 'delimiter.cpp' }
|
||||
]
|
||||
},
|
||||
{
|
||||
line: ' // This is a comment, not a string',
|
||||
tokens: [
|
||||
{ startIndex: 0, type: '' },
|
||||
{ startIndex: 4, type: 'comment.cpp' }
|
||||
]
|
||||
}
|
||||
]
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -377,7 +377,7 @@ export const language = <ILanguage>{
|
|||
|
||||
raw: [
|
||||
[
|
||||
/(.*)(\))(?:([^ ()\\\t]*))(\")/,
|
||||
/(.*)(\))(?:([^ ()\\\t"]*))(\")/,
|
||||
{
|
||||
cases: {
|
||||
'$3==$S2': [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue