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'],
|
[/\$\w+/, 'key'],
|
||||||
[/\$\(/, 'key', '@paste'],
|
[/\$\(/, 'key', '@paste'],
|
||||||
|
|
||||||
[/@@ident/, 'annotation'],
|
[/@@@ident/, 'annotation'],
|
||||||
|
|
||||||
// whitespace
|
// whitespace
|
||||||
{ include: '@whitespace' },
|
{ include: '@whitespace' },
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
// The main tokenizer for our languages
|
// The main tokenizer for our languages
|
||||||
tokenizer: {
|
tokenizer: {
|
||||||
root: [
|
root: [
|
||||||
[/@@/], // text
|
[/@@@@/], // text
|
||||||
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
|
[/@[^@]/, { token: '@rematch', switchTo: '@razorInSimpleState.root' }],
|
||||||
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
[/<!DOCTYPE/, 'metatag.html', '@doctype'],
|
||||||
[/<!--/, 'comment.html', '@comment'],
|
[/<!--/, 'comment.html', '@comment'],
|
||||||
|
|
|
||||||
|
|
@ -282,7 +282,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'], // constant
|
[/[A-Z][\w]*[!?=]?/, 'constructor.identifier'], // constant
|
||||||
[/\$[\w]*/, 'global.constant'], // global
|
[/\$[\w]*/, 'global.constant'], // global
|
||||||
[/@[\w]*/, 'namespace.instance.identifier'], // instance
|
[/@[\w]*/, 'namespace.instance.identifier'], // instance
|
||||||
[/@@[\w]*/, 'namespace.class.identifier'], // class
|
[/@@@[\w]*/, 'namespace.class.identifier'], // class
|
||||||
|
|
||||||
// here document
|
// here document
|
||||||
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
[/<<[-~](@heredelim).*/, { token: 'string.heredoc.delimiter', next: '@heredoc.$1' }],
|
||||||
|
|
@ -444,7 +444,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
interpolated: [
|
interpolated: [
|
||||||
[/\$\w*/, 'global.constant', '@pop'],
|
[/\$\w*/, 'global.constant', '@pop'],
|
||||||
[/@\w*/, 'namespace.class.identifier', '@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: [
|
attribute: [
|
||||||
[
|
[
|
||||||
/\@@identifier/,
|
/@@@identifier/,
|
||||||
{
|
{
|
||||||
cases: {
|
cases: {
|
||||||
'@attributes': 'keyword.control',
|
'@attributes': 'keyword.control',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue