FIx word breaker for keyword identifiers

This commit is contained in:
Matt Masson 2018-07-10 15:41:19 -04:00
parent 250f5d42d8
commit 7c6fe3b1bf
2 changed files with 36 additions and 2 deletions

View file

@ -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" },