[Monaco]Improve .gitignore definition (#33263)

* Update gitignore.js

* Update gitignore.js

* Add custom color for negations

* Add custom color for negations

* Regex refactoring

* Regex refactoring again

* Move customTokenColors to a separate file

* Move customTokenColors to a separate file

* Update devdocs

* Use kebab case for token names

* Update negation color

* Update index.html formatting
This commit is contained in:
PesBandi
2024-06-14 17:09:52 +02:00
committed by GitHub
parent bc0811e6a1
commit cdf5677eb9
6 changed files with 46 additions and 22 deletions

View File

@@ -5,8 +5,8 @@
tokenizer: {
root: [
[/^#.*$/, 'comment'],
[/^\s*!.*/, 'invalid'],
[/^\s*[^#]+/, "tag"]
[/.*((?<!(^|\/))\*\*.*|\*\*(?!(\/|$))).*/, 'invalid'],
[/((?:^!\s*(?:\\\s|\S)+)?)((?:^\s*(?:\\\s|\S)+)?)((?:\s+(?:\\\s|\S)+)*)/, ['custom-gitignore.negation', 'tag', 'invalid']]
]
}
};