File tree 1 file changed +4
-5
lines changed 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,8 @@ let findCallFromArgument text offset =
51
51
in
52
52
loop ~i: offset ~n Closed:0
53
53
54
- (* skip A or #A if present *)
55
- let rec skipOptVariant text i =
54
+ (* skip A or #A or %A if present *)
55
+ let skipOptVariantExtension text i =
56
56
if i > 0 then
57
57
match text.[i] with
58
58
| 'a' .. 'z' | 'A' .. 'Z' | '_' | '0' .. '9' ->
@@ -61,8 +61,7 @@ let rec skipOptVariant text i =
61
61
if i > 0 then match text.[i] with '#' | '%' -> i - 1 | _ -> i else i
62
62
in
63
63
i
64
- | '%' -> skipOptVariant text (i - 1 )
65
- | _ -> i
64
+ | _ -> i
66
65
else i
67
66
68
67
(* Figure out whether id should be autocompleted as component prop.
@@ -118,7 +117,7 @@ let findJsxContext text offset =
118
117
else None
119
118
and beforeParen identsSeen i =
120
119
let i = skipWhite text i in
121
- beforeValue identsSeen (skipOptVariant text i)
120
+ beforeValue identsSeen (skipOptVariantExtension text i)
122
121
and beforeValue identsSeen i =
123
122
let i = skipWhite text i in
124
123
if i > 0 then
You can’t perform that action at this time.
0 commit comments