From a8ba89c8b48bb66c4e40c33170f737bad93e17df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul-Elliot=20Angl=C3=A8s=20d=27Auriac?= Date: Wed, 6 Sep 2023 10:17:38 +0200 Subject: [PATCH] Consider extension constructor as constructors in css --- src/document/generator.ml | 4 +++- test/generators/html/Labels.html | 2 +- test/generators/html/Ocamlary-ExtMod.html | 2 +- .../html/Ocamlary-module-type-TypeExt.html | 2 +- .../Ocamlary-module-type-TypeExtPruned.html | 2 +- test/generators/html/Ocamlary.html | 24 +++++++++---------- test/generators/html/Type.html | 6 ++--- 7 files changed, 22 insertions(+), 20 deletions(-) diff --git a/src/document/generator.ml b/src/document/generator.ml index 84983cd4f7..df67f386b7 100644 --- a/src/document/generator.ml +++ b/src/document/generator.ml @@ -615,7 +615,9 @@ module Make (Syntax : SYNTAX) = struct | Error e -> failwith (Url.Error.to_string e) | Ok url -> let anchor = Some url in - let attrs = [ "def"; Url.Anchor.string_of_kind url.kind ] in + let attrs = + [ "def"; "variant"; Url.Anchor.string_of_kind url.kind ] + in let code = O.documentedSrc (O.txt "| ") @ constructor id t.args t.res in diff --git a/test/generators/html/Labels.html b/test/generators/html/Labels.html index f01fe5dffe..ee1fc3d2c4 100644 --- a/test/generators/html/Labels.html +++ b/test/generators/html/Labels.html @@ -118,7 +118,7 @@

Attached to nothing

    -
  1. +
  2. | X diff --git a/test/generators/html/Ocamlary-ExtMod.html b/test/generators/html/Ocamlary-ExtMod.html index cbaaaff393..329c03d8b2 100644 --- a/test/generators/html/Ocamlary-ExtMod.html +++ b/test/generators/html/Ocamlary-ExtMod.html @@ -32,7 +32,7 @@

    Module Ocamlary.ExtMod

      -
    1. +
    2. | Leisureforce diff --git a/test/generators/html/Ocamlary-module-type-TypeExt.html b/test/generators/html/Ocamlary-module-type-TypeExt.html index d9d810d0b1..983aaa3415 100644 --- a/test/generators/html/Ocamlary-module-type-TypeExt.html +++ b/test/generators/html/Ocamlary-module-type-TypeExt.html @@ -31,7 +31,7 @@

      Module type Ocamlary.TypeExt

        -
      1. +
      2. | C diff --git a/test/generators/html/Ocamlary-module-type-TypeExtPruned.html b/test/generators/html/Ocamlary-module-type-TypeExtPruned.html index f221161313..39f785509d 100644 --- a/test/generators/html/Ocamlary-module-type-TypeExtPruned.html +++ b/test/generators/html/Ocamlary-module-type-TypeExtPruned.html @@ -24,7 +24,7 @@

        Module type Ocamlary.TypeExtPruned

          -
        1. +
        2. | C diff --git a/test/generators/html/Ocamlary.html b/test/generators/html/Ocamlary.html index fabbacbb40..4d24b672fd 100644 --- a/test/generators/html/Ocamlary.html +++ b/test/generators/html/Ocamlary.html @@ -1797,7 +1797,7 @@

            -
          1. +
          2. | ExtA @@ -1813,7 +1813,7 @@

              -
            1. +
            2. | ExtB @@ -1829,7 +1829,7 @@

                -
              1. +
              2. | ExtC @@ -1837,7 +1837,7 @@

              3. -
              4. +
              5. | ExtD @@ -1856,7 +1856,7 @@

                  -
                1. +
                2. | ExtE @@ -1872,7 +1872,7 @@

                    -
                  1. +
                  2. | ExtF @@ -1898,7 +1898,7 @@

                      -
                    1. +
                    2. | Foo @@ -1906,7 +1906,7 @@

                    3. -
                    4. +
                    5. | Bar @@ -1930,7 +1930,7 @@

                        -
                      1. +
                      2. | Quux @@ -1966,7 +1966,7 @@

                          -
                        1. +
                        2. | ZzzTop0 @@ -1987,7 +1987,7 @@

                            -
                          1. +
                          2. | ZzzTop @@ -2931,7 +2931,7 @@

                              -
                            1. +
                            2. | C diff --git a/test/generators/html/Type.html b/test/generators/html/Type.html index 4e82317917..18601bebdc 100644 --- a/test/generators/html/Type.html +++ b/test/generators/html/Type.html @@ -753,7 +753,7 @@

                              Module Type

                                -
                              1. +
                              2. | Extension @@ -764,8 +764,8 @@

                                Module Type

                                *)
                              3. -
                              4. - +
                              5. | Another_extension