mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Support whitespace between annotation brackets
See compiler-explorer/compiler-explorer#880
This commit is contained in:
parent
265d83f041
commit
c8c2ebc277
2 changed files with 10 additions and 2 deletions
|
|
@ -298,7 +298,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
{ include: '@whitespace' },
|
||||
|
||||
// [[ attributes ]].
|
||||
[/\[\[/, { token: 'annotation', next: '@annotation' }],
|
||||
[/\[\s*\[/, { token: 'annotation', next: '@annotation' }],
|
||||
|
||||
[/^\s*#include/, { token: 'keyword.directive.include', next: '@include' }],
|
||||
|
||||
|
|
@ -390,7 +390,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/[a-zA-Z0-9_]+/, 'annotation'],
|
||||
[/[,:]/, 'delimiter'],
|
||||
[/[()]/, '@brackets'],
|
||||
[/\]\]/, { token: 'annotation', next: '@pop' }]
|
||||
[/\]\s*\]/, { token: 'annotation', next: '@pop' }]
|
||||
],
|
||||
|
||||
include: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue