Skip to content
Closed
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion TypeScript.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ variables:
{{functionLikeType}} |
(:\s*(=>|{{matchingParenthesis}}|(<[^<>]*>)|[^<>(),=])+={{functionOrArrowLookup}})
arrowFunctionEnd: (?==>|\{|(^\s*(export|function|class|interface|let|var|{{usingKeyword}}|{{awaitUsingKeyword}}|const|import|enum|namespace|module|type|abstract|declare)\s+))
regexpTail: ([dgimsuy]+|(?![\/\*])|(?=\/\*))(?!\s*[a-zA-Z0-9_$])
regexpTail: (?!\*)[dgimsuy]*((?!\/)|(?=\/\*))(?!\s*[a-zA-Z0-9_$])
completeRegexp: \/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)*\])+\/{{regexpTail}})

patterns:
Expand Down
34 changes: 34 additions & 0 deletions tests/baselines/Issue1024.baseline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
original file
-----------------------------------
1
/ f(/u/g);
-----------------------------------

Grammar: TypeScript.tmLanguage
-----------------------------------
>1
^
source.ts constant.numeric.decimal.ts
> / f(/u/g);
^
source.ts
^
source.ts keyword.operator.arithmetic.ts
^
source.ts
^
source.ts meta.function-call.ts entity.name.function.ts
^
source.ts meta.brace.round.ts
^
source.ts string.regexp.ts punctuation.definition.string.begin.ts
^
source.ts string.regexp.ts
^
source.ts string.regexp.ts punctuation.definition.string.end.ts
^
source.ts string.regexp.ts keyword.other.ts
^
source.ts meta.brace.round.t
^
source.ts punctuation.terminator.statement.ts
2 changes: 2 additions & 0 deletions tests/cases/Issue1024.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
1
/ f(/u/g);