@@ -244,10 +244,59 @@ describe_opt("textDocument/completion", () => {
244
244
it ( "can return documentation for the function being applied" , async ( ) => {
245
245
openDocument (
246
246
outdent `
247
- (** This function has a nice documentation.
248
-
249
- It performs division of two integer numbers.
250
-
247
+ (** This is an example of a docstring that demonstrates various ocamldoc syntax features.
248
+
249
+ {3 Sections and Labels}
250
+
251
+ We can create sections using {3 Section title} and labels using {3:label_name Section title with label}
252
+
253
+ {3 Links and Cross-references}
254
+
255
+ External links: {{:https://ocaml.org/} OCaml's official website}
256
+
257
+ {3 Inline Formatting}
258
+
259
+ {b Bold}, {i Italic}, {e Emphasize}, {^ Superscript}, {_ Subscript}, and [inline code]
260
+
261
+ {3 Text Alignment}
262
+
263
+ {C Centered text}
264
+ {L Left-aligned text}
265
+ {R Right-aligned text}
266
+
267
+ {3 Lists}
268
+
269
+ {ol
270
+ {- Ordered list item 1}
271
+ {- Ordered list item 2}
272
+ }
273
+
274
+ {ul
275
+ {- Unordered list item 1}
276
+ {- Unordered list item 2}
277
+ }
278
+
279
+ - Unordered list item 1
280
+ - Unordered list item 2
281
+
282
+ {3 Code Blocks}
283
+
284
+ {[
285
+ let square x = x * x
286
+ let result = square 3
287
+ ]}
288
+
289
+ {3 Verbatim}
290
+
291
+ {v
292
+ This text will be displayed verbatim.
293
+ No formatting will be applied.
294
+ v}
295
+
296
+ {3 Module List}
297
+
298
+ {!modules: Array List String}
299
+
251
300
@param x dividend
252
301
@param divisor
253
302
@@ -288,10 +337,66 @@ describe_opt("textDocument/completion", () => {
288
337
] ,
289
338
documentation : {
290
339
kind : "markdown" ,
291
- value : outdent `
292
- This function has a nice documentation.
293
-
294
- It performs division of two integer numbers.
340
+ value : outdent `This is an example of a docstring that demonstrates various ocamldoc syntax features.
341
+
342
+ ### Sections and Labels
343
+
344
+ We can create sections using
345
+
346
+ ### Section title
347
+
348
+ and labels using
349
+
350
+ ### Section title with label
351
+
352
+ ### Links and Cross-references
353
+
354
+ External links: [OCaml's official website](https://ocaml.org/)
355
+
356
+ ### Inline Formatting
357
+
358
+ **Bold**, *Italic*, *Emphasize*, Superscript, Subscript, and \`inline code\`
359
+
360
+ ### Text Alignment
361
+
362
+ Centered text
363
+
364
+ Left-aligned text
365
+
366
+ Right-aligned text
367
+
368
+ ### Lists
369
+
370
+ 1.Ordered list item 1
371
+ 2.Ordered list item 2
372
+
373
+ *Unordered list item 1
374
+ *Unordered list item 2
375
+
376
+ *Unordered list item 1
377
+ *Unordered list item 2
378
+
379
+ ### Code Blocks
380
+
381
+ \`\`\`
382
+ let square x = x * x
383
+ let result = square 3
384
+ let result = square 3
385
+ \`\`\`
386
+
387
+ ### Verbatim
388
+
389
+ \`\`\`verb
390
+ This text will be displayed verbatim.
391
+ No formatting will be applied.
392
+ No formatting will be applied.
393
+ \`\`\`
394
+
395
+ ### Module List
396
+
397
+ *Array
398
+ *List
399
+ *String
295
400
296
401
***@param*** \`x\`
297
402
dividend
0 commit comments