Skip to content

Commit

Permalink
Promote tests, don't generate links in markdown by default
Browse files Browse the repository at this point in the history
Signed-off-by: lubegasimon <[email protected]>
  • Loading branch information
lubegasimon committed Sep 15, 2021
1 parent 2584bfc commit b0cc543
Show file tree
Hide file tree
Showing 15 changed files with 176 additions and 186 deletions.
2 changes: 1 addition & 1 deletion test/generators/markdown/Bugs.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Bugs
<a id="val-foo"></a>
###### &nbsp; val foo : ?bar:'a -> unit -> unit

Triggers an assertion failure when [https://github.com/ocaml/odoc/issues/101](https://github.com/ocaml/odoc/issues/101) is not fixed.
Triggers an assertion failure when https://github.com/ocaml/odoc/issues/101 is not fixed.


10 changes: 5 additions & 5 deletions test/generators/markdown/Include.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ end
###### &nbsp; module type Inherent_Module = sig

<a id="val-a"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;val a : [t](#type-t)
###### &nbsp; &nbsp; &nbsp; &nbsp;val a : t


end
Expand All @@ -81,7 +81,7 @@ end


<a id="val-a"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;val a : [u](#type-u)
###### &nbsp; &nbsp; &nbsp; &nbsp;val a : u


end
Expand All @@ -91,7 +91,7 @@ end


<a id="val-a"></a>
###### &nbsp; val a : [u](#type-u)
###### &nbsp; val a : u


IncludeNot_inlined
Expand Down Expand Up @@ -126,7 +126,7 @@ IncludeInherent_Module

Module type `` Include.Inherent_Module``
<a id="val-a"></a>
###### &nbsp; val a : [t](#type-t)
###### &nbsp; val a : t


IncludeDorminant_Module
Expand All @@ -135,5 +135,5 @@ IncludeDorminant_Module


<a id="val-a"></a>
###### &nbsp; val a : [u](#type-u)
###### &nbsp; val a : u

36 changes: 18 additions & 18 deletions test/generators/markdown/Labels.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ Attached to type


<a id="val-f"></a>
###### &nbsp; val f : [t](#type-t)
###### &nbsp; val f : t

Attached to value




<a id="val-e"></a>
###### &nbsp; val e : unit -> [t](#type-t)
###### &nbsp; val e : unit -> t

Attached to external

Expand Down Expand Up @@ -77,7 +77,7 @@ Attached to exception


<a id="extension-decl-X"></a>
###### &nbsp; type [x](#type-x) +=
###### &nbsp; type x +=

<a id="extension-X"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;| X
Expand All @@ -100,7 +100,7 @@ Attached to module subst


<a id="type-s"></a>
###### &nbsp; type s := [t](#type-t)
###### &nbsp; type s := t

Attached to type subst

Expand All @@ -125,7 +125,7 @@ Attached to type subst
###### &nbsp; type v = {

<a id="type-v.f"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;`` f : [t](#type-t);
###### &nbsp; &nbsp; &nbsp; &nbsp;`` f : t;
``

Attached to field
Expand All @@ -139,31 +139,31 @@ Attached to type subst
Testing that labels can be referenced


- [Attached to unit](#L1)
- Attached to unit

- [Attached to nothing](#L2)
- Attached to nothing

- [Attached to module](#L3)
- Attached to module

- [Attached to type](#L4)
- Attached to type

- [Attached to value](#L5)
- Attached to value

- [Attached to class](#L6)
- Attached to class

- [Attached to class type](#L7)
- Attached to class type

- [Attached to exception](#L8)
- Attached to exception

- [Attached to extension](#L9)
- Attached to extension

- [Attached to module subst](#L10)
- Attached to module subst

- [Attached to type subst](#L11)
- Attached to type subst

- [Attached to constructor](#L12)
- Attached to constructor

- [Attached to field](#L13)
- Attached to field

LabelsA

Expand Down
29 changes: 14 additions & 15 deletions test/generators/markdown/Markup.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ but odoc has banned deeper headings. There are also title headings, but they are
### Anchors


Sections can have attached [Anchors](#anchors), and it is possible to [link](#anchors) to them. Links to section headers should not be set in source code style.
Sections can have attached Anchors, and it is possible to link to them. Links to section headers should not be set in source code style.



Expand Down Expand Up @@ -67,8 +67,7 @@ _emphasis_, __emphasis_ within emphasis_, **_bold italic_**, super<sup>script, s

Note: _In italics _emphasis_ is rendered as normal text while _emphasis
_in_ emphasis_ is rendered in italics._
_It also work the same in [links](#)[ ](#)[in](#)[ ](#)[italics](#)[ ](#)
[with](#)[ ](#)[.](#)_
_It also work the same in links in italics with _emphasis _in_ emphasis_._


`` code
Expand All @@ -92,17 +91,17 @@ Code can appear **inside `` other`` markup**. Its display shouldn't be affected
# Links and references


This is a [link](#). It sends you to the top of this page. Links can have markup inside them: , , ,
[super](#), [sub](#), and . Links can also be nested _[inside](#)_ markup. Links cannot be nested inside each other. This link has no replacement text:
[#](#). The text is filled in by odoc. This is a shorthand link: [#](#). The text is also filled in by odoc in this case.
This is a link. It sends you to the top of this page. Links can have markup inside them:
**bold**, _italics_, _emphasis_, super<sup>script, sub<sub>script, and
`` code
`` . Links can also be nested _inside_ markup. Links cannot be nested inside each other. This link has no replacement text: #. The text is filled in by odoc. This is a shorthand link: #. The text is also filled in by odoc in this case.


This is a reference to [`` foo
`` ](#val-foo). References can have replacement text: [the value foo](#val-foo). Except for the special lookup support, references are pretty much just like links. The replacement text can have nested styles: [
**bold**](#val-foo), [_italic_](#val-foo), [_emphasis_](#val-foo), [super
<sup>script](#val-foo), [sub<sub>script](#val-foo), and [`` code
`` ](#val-foo). It's also possible to surround a reference in a style:
**[`` foo`` ](#val-foo)**. References can't be nested inside references, and links and references can't be nested inside each other.
This is a reference to `` foo
`` . References can have replacement text: the value foo. Except for the special lookup support, references are pretty much just like links. The replacement text can have nested styles:
**bold**, _italic_, _emphasis_, super<sup>script, sub<sub>script, and
`` code
`` . It's also possible to surround a reference in a style: **`` foo`` **. References can't be nested inside references, and links and references can't be nested inside each other.



Expand Down Expand Up @@ -165,8 +164,8 @@ can use explicitly-delimited lists.

- and can include references

- [`` foo
`` ](#val-foo)
- `` foo
``



Expand Down Expand Up @@ -245,7 +244,7 @@ Each comment can end with zero or more tags. Here are some examples:



@see [#](#) : this url
@see # : this url



Expand Down
3 changes: 1 addition & 2 deletions test/generators/markdown/Module.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ Foo.
<a id="val-foo"></a>
###### &nbsp; val foo : unit

The module needs at least one signature item, otherwise a bug causes the compiler to drop the module comment (above). See
[https://caml.inria.fr/mantis/view.php?id=7701](https://caml.inria.fr/mantis/view.php?id=7701).
The module needs at least one signature item, otherwise a bug causes the compiler to drop the module comment (above). See https://caml.inria.fr/mantis/view.php?id=7701.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
2 changes: 1 addition & 1 deletion test/generators/markdown/Ocamlary.CollectionModule.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
8 changes: 4 additions & 4 deletions test/generators/markdown/Ocamlary.FunctorTypeOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ This comment is for `` t
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -149,7 +149,7 @@ This comment is for `` t
###### &nbsp; &nbsp; &nbsp; &nbsp;module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -217,7 +217,7 @@ This comment is for `` t
###### &nbsp; module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -257,7 +257,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
10 changes: 5 additions & 5 deletions test/generators/markdown/Ocamlary.Recollection.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ This comment is for `` t
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -172,7 +172,7 @@ This comment is for `` t
###### &nbsp; &nbsp; &nbsp; &nbsp;module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -240,7 +240,7 @@ This comment is for `` t
###### &nbsp; module InnerModuleA' : sig

<a id="type-t"></a>
###### &nbsp; &nbsp; &nbsp; &nbsp;type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; &nbsp; &nbsp; &nbsp;type t = (unit, unit) a_function

This comment is for `` t`` .

Expand Down Expand Up @@ -280,7 +280,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down Expand Up @@ -355,7 +355,7 @@ This comment is for `` InnerModuleA'
`` .

<a id="type-t"></a>
###### &nbsp; type t = (unit, unit) [a_function](#type-a_function)
###### &nbsp; type t = (unit, unit) a_function

This comment is for `` t
`` .
Expand Down
Loading

0 comments on commit b0cc543

Please sign in to comment.