We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 45eefdc commit f6a265cCopy full SHA for f6a265c
src/util/treeUtils.ts
@@ -11,6 +11,8 @@ export type NodeType =
11
| "Module"
12
| "UnionConstructor";
13
14
+const functionNameRegex: RegExp = new RegExp("[a-zA-Z0-9_]+");
15
+
16
export type Exposing = {
17
name: string;
18
syntaxNode: SyntaxNode;
@@ -1043,7 +1045,7 @@ export class TreeUtils {
1043
1045
.split("\n")
1044
1046
[position.line].substring(previousCharColumn, position.character);
1047
- if (charBeforeCursor === " " || charBeforeCursor === "") {
1048
+ if (!functionNameRegex.test(charBeforeCursor)) {
1049
return node.namedDescendantForPosition({
1050
column: position.character,
1051
row: position.line,
0 commit comments