mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 16:15:41 +01:00
Fixes microsoft/monaco-editor#2424: Escape consecutive @@
This commit is contained in:
parent
90417ad4ff
commit
d78c032a75
4 changed files with 5 additions and 5 deletions
|
|
@ -404,7 +404,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/\$\w+/, 'key'],
|
||||
[/\$\(/, 'key', '@paste'],
|
||||
|
||||
[/@@ident/, 'annotation'],
|
||||
[/@@@ident/, 'annotation'],
|
||||
|
||||
// whitespace
|
||||
{ include: '@whitespace' },
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
// The main tokenizer for our languages
|
||||
tokenizer: {
|
||||
root: [
|
||||
[/@@/], // text
|
||||
[/@@@@/], // text
|
||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
|
||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||
[/<!--/, 'comment.html', '@comment'],
|
||||
|
|
|
|||
|
|
@ -282,7 +282,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'], // constant
|
||||
[/\$[\w]*/, 'global.constant'], // global
|
||||
[/@[\w]*/, 'namespace.instance.identifier'], // instance
|
||||
[/@@[\w]*/, 'namespace.class.identifier'], // class
|
||||
[/@@@[\w]*/, 'namespace.class.identifier'], // class
|
||||
|
||||
// here document
|
||||
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||
|
|
@ -444,7 +444,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
interpolated: [
|
||||
[/\$\w*/, 'global.constant', '@pop'],
|
||||
[/@\w*/, 'namespace.class.identifier', '@pop'],
|
||||
[/@@\w*/, 'namespace.instance.identifier', '@pop'],
|
||||
[/@@@\w*/, 'namespace.instance.identifier', '@pop'],
|
||||
[
|
||||
/[{]/,
|
||||
{
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
|
||||
attribute: [
|
||||
[
|
||||
/\@@identifier/,
|
||||
/@@@identifier/,
|
||||
{
|
||||
cases: {
|
||||
'@attributes': 'keyword.control',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue