mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
More tweaks for optimal colorization
This commit is contained in:
parent
da418eb8d9
commit
6882a78485
13 changed files with 176 additions and 188 deletions
26
src/xml.ts
26
src/xml.ts
|
|
@ -44,25 +44,25 @@ export var language = <ILanguage> {
|
|||
|
||||
// Standard opening tag
|
||||
[/(<)(@qualifiedName)/, [
|
||||
{ token: 'delimiter.start' },
|
||||
{ token: 'tag.tag-$2', next: '@tag.$2' }]],
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag', next: '@tag' }]],
|
||||
|
||||
// Standard closing tag
|
||||
[/(<\/)(@qualifiedName)(\s*)(>)/, [
|
||||
{ token: 'delimiter.end' },
|
||||
{ token: 'tag.tag-$2' },
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'tag' },
|
||||
'',
|
||||
{ token: 'delimiter.end' }]],
|
||||
{ token: 'delimiter' }]],
|
||||
|
||||
// Meta tags - instruction
|
||||
[/(<\?)(@qualifiedName)/, [
|
||||
{ token: 'delimiter.start' },
|
||||
{ token: 'metatag.instruction', next: '@tag' }]],
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }]],
|
||||
|
||||
// Meta tags - declaration
|
||||
[/(<\!)(@qualifiedName)/, [
|
||||
{ token: 'delimiter.start' },
|
||||
{ token: 'metatag.declaration', next: '@tag' }]],
|
||||
{ token: 'delimiter' },
|
||||
{ token: 'metatag', next: '@tag' }]],
|
||||
|
||||
// CDATA
|
||||
[/<\!\[CDATA\[/, { token: 'delimiter.cdata', next: '@cdata' }],
|
||||
|
|
@ -82,11 +82,11 @@ export var language = <ILanguage> {
|
|||
[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/, ['attribute.name', '', 'attribute.value']],
|
||||
[/@qualifiedName/, 'attribute.name'],
|
||||
[/\?>/, { token: 'delimiter.start', next: '@pop' }],
|
||||
[/\?>/, { token: 'delimiter', next: '@pop' }],
|
||||
[/(\/)(>)/, [
|
||||
{ token: 'tag.tag-$S2' },
|
||||
{ token: 'delimiter.start', next: '@pop' }]],
|
||||
[/>/, { token: 'delimiter.start', next: '@pop' }],
|
||||
{ token: 'tag' },
|
||||
{ token: 'delimiter', next: '@pop' }]],
|
||||
[/>/, { token: 'delimiter', next: '@pop' }],
|
||||
],
|
||||
|
||||
whitespace: [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue