File: run.t

package info (click to toggle)
ocaml-odoc 3.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 12,104 kB
  • sloc: ml: 59,291; javascript: 2,572; sh: 566; makefile: 31
file content (37 lines) | stat: -rw-r--r-- 1,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
A quick test to repro the issue found in #342

  $ ocamlc -bin-annot -c foo.mli

  $ odoc compile foo.cmti
  $ odoc link foo.odoc

  $ odoc html-generate --indent -o html/ foo.odocl

The table of content:

  $ cat html/Foo/index.html | grep "odoc-toc" -A 9
    <div class="odoc-tocs">
     <nav class="odoc-toc odoc-local-toc">
      <ul>
       <li>
        <a href="#references--and-with-text-in-title">References <code>A</code>
          and with text in title
        </a>
       </li>
       <li>
        <a href="#an-url--and-with-text-in-a-title">An url http://ocaml.org
          and with text in a title

The rendered headings

  $ cat html/Foo/index.html | grep "<h2" -A 3
     <h2 id="references--and-with-text-in-title">
      <a href="#references--and-with-text-in-title" class="anchor"></a>
      References <a href="A/index.html"><code>A</code></a> and 
      <a href="A/index.html" title="A">with text</a> in title
  --
     <h2 id="an-url--and-with-text-in-a-title">
      <a href="#an-url--and-with-text-in-a-title" class="anchor"></a>An
       url <a href="http://ocaml.org">http://ocaml.org</a> and 
      <a href="http://ocaml.org">with text</a> in a title