mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
fixed Color highlight in xml closing tag
This commit is contained in:
parent
9242cdfd03
commit
f0f14feb37
2 changed files with 21 additions and 6 deletions
|
|
@ -301,6 +301,21 @@ testTokenization('xml', [
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// End Tag with Newline Before Closing Bracket
|
||||||
|
[
|
||||||
|
{
|
||||||
|
line: '</test',
|
||||||
|
tokens: [
|
||||||
|
{ startIndex: 0, type: 'delimiter.xml' },
|
||||||
|
{ startIndex: 2, type: 'tag.xml' }
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
line: '>',
|
||||||
|
tokens: [{ startIndex: 0, type: 'delimiter.xml' }]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
// Comments
|
// Comments
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -54,12 +54,7 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
[/(<)(@qualifiedName)/, [{ token: 'delimiter' }, { token: 'tag', next: '@tag' }]],
|
[/(<)(@qualifiedName)/, [{ token: 'delimiter' }, { token: 'tag', next: '@tag' }]],
|
||||||
|
|
||||||
// Standard closing tag
|
// Standard closing tag
|
||||||
[
|
[/(<\/)(@qualifiedName)/, [{ token: 'delimiter' }, { token: 'tag', next: '@closeTag' }]], // Meta tags - instruction
|
||||||
/(<\/)(@qualifiedName)(\s*)(>)/,
|
|
||||||
[{ token: 'delimiter' }, { token: 'tag' }, '', { token: 'delimiter' }]
|
|
||||||
],
|
|
||||||
|
|
||||||
// Meta tags - instruction
|
|
||||||
[/(<\?)(@qualifiedName)/, [{ token: 'delimiter' }, { token: 'metatag', next: '@tag' }]],
|
[/(<\?)(@qualifiedName)/, [{ token: 'delimiter' }, { token: 'metatag', next: '@tag' }]],
|
||||||
|
|
||||||
// Meta tags - declaration
|
// Meta tags - declaration
|
||||||
|
|
@ -77,6 +72,11 @@ export const language = <languages.IMonarchLanguage>{
|
||||||
[/\]/, '']
|
[/\]/, '']
|
||||||
],
|
],
|
||||||
|
|
||||||
|
closeTag: [
|
||||||
|
[/[ \t\r\n]+/, ''],
|
||||||
|
[/>/, { token: 'delimiter', next: '@pop' }]
|
||||||
|
],
|
||||||
|
|
||||||
tag: [
|
tag: [
|
||||||
[/[ \t\r\n]+/, ''],
|
[/[ \t\r\n]+/, ''],
|
||||||
[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name', '', 'attribute.value']],
|
[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/, ['attribute.name', '', 'attribute.value']],
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue