diff --git a/src/html/generator.ml b/src/html/generator.ml index 68fcf7366f..bf78af7d7a 100644 --- a/src/html/generator.ml +++ b/src/html/generator.ml @@ -278,7 +278,9 @@ and items ~resolve l : item Html.elt list = let content = flow_to_item @@ block ~resolve text in let elts = if only_text then content - else [ Html.aside (content :> any Html.elt list) ] + else + let a = [ Html.a_class [ "odoc-unattached" ] ] in + [ Html.aside ~a (content :> any Html.elt list) ] in elts |> (continue_with [@tailcall]) rest | Heading h :: rest -> @@ -308,7 +310,7 @@ and items ~resolve l : item Html.elt list = let a = class_of_kind kind @ anchor_attrib in (* TODO : Why double div ??? *) [ - Html.div + Html.div ~a:[ Html.a_class [ "odoc-include" ] ] [ Html.div ~a ( anchor_link @@ -321,13 +323,13 @@ and items ~resolve l : item Html.elt list = let a = class_of_kind kind @ anchor_attrib in let content = anchor_link @ documentedSrc ~resolve content in let elts = - let content = div ~a content in - match doc with - | [] -> [ content ] + let doc = match doc with + | [] -> [] | docs -> - [ - Html.div [ content; div (flow_to_item @@ block ~resolve docs) ]; - ] + let a = [ Html.a_class [ "spec-doc" ] ] in + [ div ~a (flow_to_item @@ block ~resolve docs) ] + in + [ div ~a: [ Html.a_class [ "odoc-spec" ]] (div ~a content :: doc) ] in (continue_with [@tailcall]) rest elts and items l = walk_items ~only_text:(is_only_text l) [] l in diff --git a/test/html/expect/test_package+custom_theme,ml/Include/index.html b/test/html/expect/test_package+custom_theme,ml/Include/index.html index 217991ce20..4302345d69 100644 --- a/test/html/expect/test_package+custom_theme,ml/Include/index.html +++ b/test/html/expect/test_package+custom_theme,ml/Include/index.html @@ -23,112 +23,138 @@
module type Not_inlined = sig ... end
+ module type Not_inlined = sig ... end
+ include Not_inlined
module type Inlined = sig ... end
+ module type Inlined = sig ... end
+ module type Not_inlined_and_closed = sig ... end
+ module type Not_inlined_and_closed = sig ... end
+ include Not_inlined_and_closed
module type Not_inlined_and_opened = sig ... end
+ module type Not_inlined_and_opened = sig ... end
+ include Not_inlined_and_opened
module type Inherent_Module = sig ... end
+ module type Inherent_Module = sig ... end
+ include Inherent_Module
module type Dorminant_Module = sig ... end
+ module type Dorminant_Module = sig ... end
+ include Dorminant_Module
include Inherent_Module
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.
module type S = sig ... end
+ module type S = sig ... end
+ module type S1
+
- module type S2 = S
+
- module type S3 = S with type t = int and type u = string
+
- module type S4 = S with type t := int
+
-