mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 23:13:02 +01:00
FIx word breaker for keyword identifiers
This commit is contained in:
parent
250f5d42d8
commit
7c6fe3b1bf
2 changed files with 36 additions and 2 deletions
|
|
@ -97,7 +97,7 @@ export const language = <ILanguage>{
|
|||
[/\d+([eE][\-+]?\d+)?/, "number"],
|
||||
|
||||
// keywords
|
||||
[/(#?[a-z]+)/,
|
||||
[/(#?[a-z]+)\b/,
|
||||
{
|
||||
cases: {
|
||||
"@typeKeywords": "type",
|
||||
|
|
@ -111,7 +111,7 @@ export const language = <ILanguage>{
|
|||
],
|
||||
|
||||
// other identifiers
|
||||
[/([a-zA-Z_][\w\.]*)/, "identifier"],
|
||||
[/\b([a-zA-Z_][\w\.]*)\b/, "identifier"],
|
||||
|
||||
{ include: "@whitespace" },
|
||||
{ include: "@comments" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue