File tree Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Expand file tree Collapse file tree 2 files changed +3
-16
lines changed Original file line number Diff line number Diff line change @@ -48,15 +48,6 @@ and docsForModule = {
48
48
items : docItem list ;
49
49
}
50
50
51
- let formatCode content =
52
- let {Res_driver. parsetree = signature; comments} =
53
- Res_driver. parseInterfaceFromSource ~for Printer:true
54
- ~display Filename:" <missing-file>" ~source: content
55
- in
56
- Res_printer. printInterface ~width: ! Res_cli.ResClflags. width ~comments
57
- signature
58
- |> String. trim
59
-
60
51
let stringifyDocstrings docstrings =
61
52
let open Protocol in
62
53
docstrings
@@ -282,8 +273,7 @@ let extractDocs ~path ~debug =
282
273
id = modulePath |> makeId ~identifier: item.name;
283
274
docstring = item.docstring |> List. map String. trim;
284
275
signature =
285
- " let " ^ item.name ^ " : " ^ Shared. typeToString typ
286
- |> formatCode;
276
+ " let " ^ item.name ^ " : " ^ Shared. typeToString typ;
287
277
name = item.name;
288
278
deprecated = item.deprecated;
289
279
})
@@ -293,10 +283,7 @@ let extractDocs ~path ~debug =
293
283
{
294
284
id = modulePath |> makeId ~identifier: item.name;
295
285
docstring = item.docstring |> List. map String. trim;
296
- signature =
297
- typ.decl
298
- |> Shared. declToString item.name
299
- |> formatCode;
286
+ signature = typ.decl |> Shared. declToString item.name;
300
287
name = item.name;
301
288
deprecated = item.deprecated;
302
289
detail = typeDetail typ ~full ~env ;
Original file line number Diff line number Diff line change @@ -118,7 +118,7 @@ extracting docs for src/DocExtractionRes.res
118
118
"id": "DocExtractionRes.AnotherModule.someVariantWithInlineRecords",
119
119
"kind": "type",
120
120
"name": "someVariantWithInlineRecords",
121
- "signature": "type someVariantWithInlineRecords = SomeStuff({offline: bool})",
121
+ "signature": "type someVariantWithInlineRecords =\\n | SomeStuff({offline: bool})",
122
122
"docstrings": ["Trying how it looks with an inline record in a variant."],
123
123
"detail":
124
124
{
You can’t perform that action at this time.
0 commit comments