Skip to content

Commit e16a60d

Browse files
committed
fix missing docstrings in module
1 parent 74463de commit e16a60d

File tree

4 files changed

+6
-0
lines changed

4 files changed

+6
-0
lines changed

analysis/src/DocExtraction.ml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ let rec stringifyDocItem ?(indentation = 0) ~originalEnv (item : docItem) =
156156
("id", Some (wrapInQuotes m.id));
157157
("name", Some (wrapInQuotes m.name));
158158
("kind", Some (wrapInQuotes "module"));
159+
("docstrings", Some (stringifyDocstrings m.docstring));
159160
( "items",
160161
Some
161162
(m.items

analysis/tests/src/expected/DocExtraction2.res.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ preferring found resi file for impl: src/DocExtraction2.resi
2424
"id": "DocExtraction2.InnerModule",
2525
"name": "InnerModule",
2626
"kind": "module",
27+
"docstrings": [],
2728
"items": [
2829
{
2930
"id": "DocExtraction2.InnerModule.t",

analysis/tests/src/expected/DocExtraction2.resi.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ extracting docs for src/DocExtraction2.resi
2323
"id": "DocExtraction2.InnerModule",
2424
"name": "InnerModule",
2525
"kind": "module",
26+
"docstrings": [],
2627
"items": [
2728
{
2829
"id": "DocExtraction2.InnerModule.t",

analysis/tests/src/expected/DocExtractionRes.res.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ extracting docs for src/DocExtractionRes.res
5252
"id": "DocExtractionRes.SomeInnerModule",
5353
"name": "SomeInnerModule",
5454
"kind": "module",
55+
"docstrings": ["Another module level docstring here."],
5556
"items": [
5657
{
5758
"id": "DocExtractionRes.SomeInnerModule.status",
@@ -99,6 +100,7 @@ extracting docs for src/DocExtractionRes.res
99100
"id": "DocExtractionRes.AnotherModule",
100101
"name": "AnotherModule",
101102
"kind": "module",
103+
"docstrings": ["Mighty fine module here too!"],
102104
"items": [
103105
{
104106
"id": "DocExtractionRes.LinkedModule",
@@ -161,6 +163,7 @@ extracting docs for src/DocExtractionRes.res
161163
"id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported",
162164
"name": "ModuleWithThingsThatShouldNotBeExported",
163165
"kind": "module",
166+
"docstrings": [],
164167
"items": [
165168
{
166169
"id": "DocExtractionRes.ModuleWithThingsThatShouldNotBeExported.t",

0 commit comments

Comments
 (0)