-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests link in docstrings Co-authored-by: Emile Trotignon <[email protected]>
- Loading branch information
1 parent
67dd91f
commit 648c756
Showing
3 changed files
with
88 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
(** This is a docstring with a {{:https://sherlocode.com}link} *) | ||
val foo : int | ||
|
||
(** This is a docstring with a ref to {!foo} *) | ||
val bar : int |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
$ ocamlc -c a.mli -bin-annot -I . | ||
$ odoc compile -I . a.cmti | ||
$ odoc link -I . a.odoc | ||
$ export SHERLODOC_DB=db.bin | ||
$ export SHERLODOC_FORMAT=marshal | ||
$ sherlodoc index $(find . -name '*.odocl') | ||
$ sherlodoc search --print-docstring "foo" | ||
val A.foo : int | ||
<div><p>This is a docstring with a <span>link</span></p></div> | ||
$ sherlodoc search --print-docstring "bar" | ||
val A.bar : int | ||
<div><p>This is a docstring with a ref to <span><code>foo</code></span></p></div> |