Skip to content

Commit 70f19fa

Browse files
committed
emit valid id path
1 parent 323758d commit 70f19fa

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

analysis/src/DocExtraction.ml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,9 @@ let extractDocs ~path ~debug =
304304
| Module (Ident p) ->
305305
(* module Whatever = OtherModule *)
306306
let aliasToModule = p |> pathIdentToString in
307-
let modulePath = aliasToModule :: modulePath in
307+
let id =
308+
(modulePath |> List.rev |> List.hd) ^ "." ^ item.name
309+
in
308310
let items =
309311
match
310312
ProcessCmt.fileForModule ~package:full.package
@@ -313,14 +315,14 @@ let extractDocs ~path ~debug =
313315
| None -> []
314316
| Some file ->
315317
let docs =
316-
extractDocsForModule ~modulePath file.structure
318+
extractDocsForModule ~modulePath:[id] file.structure
317319
in
318320
docs.items
319321
in
320322
Some
321323
(ModuleAlias
322324
{
323-
id = modulePath |> List.rev |> SharedTypes.ident;
325+
id;
324326
name = item.name;
325327
items;
326328
docstring = item.docstring |> List.map String.trim;

0 commit comments

Comments
 (0)