@@ -19,26 +19,29 @@ let locItemsForPos ~extra pos =
19
19
20
20
let locItemForPos ~full pos =
21
21
let locItems = locItemsForPos ~extra: full.extra pos in
22
- if ! Log. spamError then
22
+ if ! Log. spamError then
23
23
print_endline
24
24
(" locItems:\n "
25
25
^ (locItems |> List. map locItemToString |> String. concat " \n " ));
26
26
match locItems with
27
- | _ :: _ :: _ :: ({locType = Typed (" makeProps" , _, _)} as l ) :: _
27
+ | _ :: _ :: _ :: ({locType = Typed (" makeProps" , _, _)} as li ) :: _
28
28
when full.file.uri |> Uri2. isInterface ->
29
29
(* heuristic for makeProps in interface files *)
30
- Some l
30
+ Some li
31
31
| [
32
32
{locType = Typed (" fragment" , _, _)};
33
33
{locType = Typed (" createElement" , _, _)};
34
34
] ->
35
35
(* heuristic for </Comp> within a fragment *)
36
36
None
37
+ | [{locType = Constant _}; ({locType = Typed (" createDOMElementVariadic" , _, _)} as li2)] ->
38
+ (* heuristic for <div> *)
39
+ Some li2
37
40
| {locType = Typed (" makeProps" , _, _)}
38
- :: ({locType = Typed (" make" , _, _)} as l2 ) :: _ ->
41
+ :: ({locType = Typed (" make" , _, _)} as li2 ) :: _ ->
39
42
(* heuristic for </Comp> within fragments: take make as makeProps does not work
40
43
the type is not greatl but jump to definition works *)
41
- Some l2
44
+ Some li2
42
45
| [({locType = Typed (_, _, LocalReference _)} as li1); li3]
43
46
when li1.loc = li3.loc ->
44
47
(* JSX and compiler combined:
0 commit comments