diff --git a/CHANGES.md b/CHANGES.md index 6cb5bf928b..8f4b01775e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,11 @@ - Support for OxCaml modes (@art-w, #1454) - Fix OxCaml with-bounds for arbitrary types (@art-w, #1466) +### Performance +- Memoize doc-comment parsing and skip doc rebuilding during link when nothing needs resolution (@jonludlam, #1480) +- Store comment text as one node per run of words rather than one per word, + which makes `.odoc` and `.odocl` files substantially smaller (@jonludlam, #1487) + ### Fixed - Remove requirement for ppx_expect in tests (@jonludlam, #1445) - Fix resolving functor through `module type of` (@Leonidas-from-XIV, #1471) diff --git a/src/document/comment.ml b/src/document/comment.ml index 80382395bb..afec36fcad 100644 --- a/src/document/comment.ml +++ b/src/document/comment.ml @@ -148,9 +148,26 @@ module Reference = struct [ inline @@ Inline.Link link ]) end +(* Merged word runs keep the source whitespace, which isn't significant + inline, so collapse each run to a single space for rendering. *) +let collapse_whitespace s = + let b = Buffer.create (Stdlib.String.length s) in + let in_ws = ref false in + Stdlib.String.iter + (fun c -> + match c with + | ' ' | '\t' | '\n' | '\r' -> + if not !in_ws then Buffer.add_char b ' '; + in_ws := true + | c -> + Buffer.add_char b c; + in_ws := false) + s; + Buffer.contents b + let leaf_inline_element : Comment.leaf_inline_element -> Inline.one = function - | `Space -> inline @@ Text " " - | `Word s -> inline @@ Text s + | `Space s -> inline @@ Text (collapse_whitespace s) + | `Word s -> inline @@ Text (collapse_whitespace s) | `Code_span s -> inline @@ Source (source_of_code s) | `Math_span s -> inline @@ Math s | `Raw_markup (target, s) -> inline @@ Raw_markup (target, s) diff --git a/src/loader/doc_attr.ml b/src/loader/doc_attr.ml index ba39445f47..68b36fa2d2 100644 --- a/src/loader/doc_attr.ml +++ b/src/loader/doc_attr.ml @@ -150,14 +150,101 @@ let mk_alert_payload ~loc name p = let span = read_location loc in Location_.at span elt +(* The same doc-comment text is often attached to many definitions (OxCaml's + ppx_template can produce tens of thousands of copies of one comment), so + parses are memoized by raw text. The parsed AST bakes in absolute source + locations, so a cached parse is only reused when it is location- + insensitive: it produced no warnings and contains no headings, references + or [{!modules ...}], whose locations feed warnings and ambiguous-heading + detection during linking. Anything else is re-parsed per occurrence. *) + +let rec inline_element_needs_own_location + (x : Odoc_parser.Ast.inline_element) = + match x with + | `Reference _ -> true + | `Styled (_, xs) -> + List.exists + (fun e -> inline_element_needs_own_location (Odoc_parser.Loc.value e)) + xs + | `Space _ | `Word _ | `Code_span _ | `Raw_markup _ | `Link _ + | `Math_span _ -> + false + +let rec nestable_block_element_needs_own_location + (x : Odoc_parser.Ast.nestable_block_element) = + match x with + | `Paragraph xs -> + List.exists + (fun e -> inline_element_needs_own_location (Odoc_parser.Loc.value e)) + xs + | `Modules _ -> true + | `Media (_, href, _, _) -> ( + match Odoc_parser.Loc.value href with + | `Reference _ -> true + | `Link _ -> false) + | `List (_, _, yss) -> + List.exists + (List.exists (fun e -> + nestable_block_element_needs_own_location (Odoc_parser.Loc.value e))) + yss + | `Table ((grid, _), _) -> + List.exists + (List.exists (fun (cell, _) -> + List.exists + (fun e -> + nestable_block_element_needs_own_location + (Odoc_parser.Loc.value e)) + cell)) + grid + | `Code_block _ | `Verbatim _ | `Math_block _ -> false + +let tag_needs_own_location (x : Odoc_parser.Ast.tag) = + match x with + | `Deprecated c | `Param (_, c) | `Raise (_, c) | `Return c + | `See (_, _, c) | `Before (_, c) | `Children_order c | `Toc_status c + | `Order_category c | `Short_title c -> + List.exists + (fun e -> + nestable_block_element_needs_own_location (Odoc_parser.Loc.value e)) + c + | `Author _ | `Since _ | `Version _ | `Canonical _ | `Inline | `Open + | `Closed | `Hidden -> + false + +let block_element_needs_own_location (x : Odoc_parser.Ast.block_element) = + match x with + | `Heading _ -> true + | `Tag t -> tag_needs_own_location t + | #Odoc_parser.Ast.nestable_block_element as x -> + nestable_block_element_needs_own_location x + +let ast_needs_own_location (ast : Odoc_parser.Ast.t) = + List.exists + (fun e -> block_element_needs_own_location (Odoc_parser.Loc.value e)) + ast + +let doc_cache : (string, Odoc_parser.Ast.t) Hashtbl.t = Hashtbl.create 256 + let attached ~warnings_tag internal_tags parent attrs = let rec loop acc_docs acc_alerts = function | attr :: rest -> ( match parse_attribute attr with | Some (`Doc (str, loc)) -> let ast_docs = - Odoc_parser.parse_comment ~location:(pad_loc loc) ~text:str - |> Error.raise_parser_warnings + match Hashtbl.find_opt doc_cache str with + | Some cached -> cached + | None -> + let parsed = + Odoc_parser.parse_comment ~location:(pad_loc loc) ~text:str + in + let ast = + Semantics.merge_ast (Error.raise_parser_warnings parsed) + in + (match Odoc_parser.warnings parsed with + | [] when not (ast_needs_own_location ast) -> + Hashtbl.replace doc_cache str ast + | _ -> ()); + ast in loop (List.rev_append ast_docs acc_docs) acc_alerts rest | Some (`Alert (name, p, loc)) -> diff --git a/src/model/comment.ml b/src/model/comment.ml index 478e47e432..841319f5c4 100644 --- a/src/model/comment.ml +++ b/src/model/comment.ml @@ -15,7 +15,7 @@ type media = [ `Image | `Audio | `Video ] type raw_markup_target = string type leaf_inline_element = - [ `Space + [ `Space of string | `Word of string | `Code_span of string | `Math_span of string @@ -155,7 +155,7 @@ let to_string (l : link_content) = | `Code_span s -> s | `Word w -> w | `Math_span m -> m - | `Space -> " " + | `Space s -> s | `Styled (_, is) -> s_of_is is | `Raw_markup (_, r) -> r and s_of_is is = diff --git a/src/model/frontmatter.ml b/src/model/frontmatter.ml index fd6aa5d3b9..c3481a617c 100644 --- a/src/model/frontmatter.ml +++ b/src/model/frontmatter.ml @@ -77,7 +77,7 @@ let parse_children_order loc (co : tag_payload) = | [] -> Ok (Location_.at loc (Children_order (List.rev acc))) | ({ Location_.value = `Word word; _ } as w) :: tl -> parse_words ({ w with value = parse_child word } :: acc) tl - | { Location_.value = `Space; _ } :: tl -> parse_words acc tl + | { Location_.value = `Space _; _ } :: tl -> parse_words acc tl | { location; _ } :: _ -> Error (Error.make "Only words are accepted when specifying children order" diff --git a/src/model/semantics.ml b/src/model/semantics.ml index 279d61604d..4c85cdf9fc 100644 --- a/src/model/semantics.ml +++ b/src/model/semantics.ml @@ -128,7 +128,7 @@ let leaf_inline_element : fun element -> match element with | { value = `Word _ | `Code_span _ | `Math_span _; _ } as element -> element - | { value = `Space _; _ } -> Location.same element `Space + | { value = `Space s; _ } -> Location.same element (`Space s) | { value = `Raw_markup (target, s); location } -> ( match target with | Some invalid_target @@ -145,6 +145,97 @@ let leaf_inline_element : Location.same element (`Code_span s) | Some target -> Location.same element (`Raw_markup (target, s))) +(* Rebuild [elt] only if the merge changed something *) +let same elt content content' mk = + if content' == content then elt + else { elt with Location_.value = mk content' } + +(* Merge runs of [`Word]/[`Space] into one [`Word] *) +let rec merge_ast_inline_elements elements = + let flush run acc = + match run with + | [] -> acc + | [ single ] -> single :: acc + | _ -> + let text_of { Location_.value; _ } = + match value with `Word w -> w | `Space s -> s | _ -> assert false + in + let value = `Word (String.concat ~sep:"" (List.rev_map text_of run)) in + let location = + Location.span (List.rev_map (fun e -> e.Location_.location) run) + in + { Location_.value; location } :: acc + in + let rec loop run acc = function + | [] -> List.rev (flush run acc) + | ({ Location_.value = `Word _ | `Space _; _ } as elt) :: tl -> + loop (elt :: run) acc tl + | elt :: tl -> loop [] (merge_ast_inline_element elt :: flush run acc) tl + in + let merged = loop [] [] elements in + let unchanged = + try List.for_all2 ( == ) merged elements with Invalid_argument _ -> false + in + if unchanged then elements else merged + +and merge_ast_inline_element elt = + let same content mk = + same elt content (merge_ast_inline_elements content) mk + in + match elt.Location_.value with + | `Styled (style, content) -> same content (fun c -> `Styled (style, c)) + | `Reference (kind, target, content) -> + same content (fun c -> `Reference (kind, target, c)) + | `Link (target, content) -> same content (fun c -> `Link (target, c)) + | _ -> elt + +let rec merge_ast_nestable elt = + match elt.Location_.value with + | `Paragraph content -> + same elt content (merge_ast_inline_elements content) (fun c -> + `Paragraph c) + | `List (kind, weight, items) -> + let items = List.map (List.map merge_ast_nestable) items in + { elt with Location_.value = `List (kind, weight, items) } + | `Table ((grid, align), weight) -> + let grid = + List.map + (List.map (fun (cell, kind) -> + (List.map merge_ast_nestable cell, kind))) + grid + in + { elt with Location_.value = `Table ((grid, align), weight) } + | `Code_block _ | `Verbatim _ | `Modules _ | `Math_block _ | `Media _ -> elt + +(* Internal tags are skipped: they parse their payload word by word. *) +let merge_ast (ast : Ast.t) : Ast.t = + let nestables = List.map merge_ast_nestable in + let tag : Ast.tag -> Ast.tag = function + | `Deprecated content -> `Deprecated (nestables content) + | `Param (s, content) -> `Param (s, nestables content) + | `Raise (s, content) -> `Raise (s, nestables content) + | `Return content -> `Return (nestables content) + | `See (kind, s, content) -> `See (kind, s, nestables content) + | `Before (s, content) -> `Before (s, nestables content) + | (`Author _ | `Since _ | `Version _ | #Ast.internal_tag) as t -> t + in + List.map + (fun elt -> + match elt.Location_.value with + | `Heading (level, label, content) -> + same elt content (merge_ast_inline_elements content) (fun c -> + `Heading (level, label, c)) + | `Tag t -> { elt with Location_.value = `Tag (tag t) } + | #Ast.nestable_block_element as v -> + let nested = merge_ast_nestable { elt with Location_.value = v } in + if nested.Location_.value == v then elt + else + { + elt with + Location_.value = (nested.Location_.value :> Ast.block_element); + }) + ast + type surrounding = [ `Link of string * Odoc_parser.Ast.inline_element Location_.with_location list @@ -352,6 +443,23 @@ let generate_heading_label : Comment.inline_element with_location list -> string Bytes.set result index c); Bytes.unsafe_to_string result in + (* Whitespace runs inside a merged [`Word] stood for a single [`Space], so + become a single hyphen. Code spans keep the per-character version. *) + let hyphenate_word_runs s = + let b = Buffer.create (String.length s) in + let in_ws = ref false in + Stdlib.String.iter + (fun c -> + match c with + | ' ' | '\t' | '\r' | '\n' -> + if not !in_ws then Buffer.add_char b '-'; + in_ws := true + | c -> + Buffer.add_char b (Astring.Char.Ascii.lowercase c); + in_ws := false) + s; + Buffer.contents b + in let strip_locs li = List.map (fun ele -> ele.Location.value) li in (* Perhaps this should be done using a [Buffer.t]; we can switch to that as @@ -361,8 +469,8 @@ let generate_heading_label : Comment.inline_element with_location list -> string | element :: more -> let anchor = match (element : Comment.inline_element) with - | `Space -> anchor ^ "-" - | `Word w -> anchor ^ Astring.String.Ascii.lowercase w + | `Space _ -> anchor ^ "-" + | `Word w -> anchor ^ hyphenate_word_runs w | `Code_span c | `Math_span c -> anchor ^ replace_spaces_with_hyphens_and_lowercase c | `Raw_markup _ -> @@ -576,7 +684,7 @@ let handle_internal_tags (type a) tags : a handle_internal_tags -> a = function in let lines = let do_ parse loc els = - let els = nestable_block_elements els in + let els = List.map nestable_block_element els in match parse loc els with | Ok res -> Some res | Error e -> @@ -603,7 +711,7 @@ let ast_to_comment ~internal_tags ~tags_allowed ~parent_of_sections (ast : Ast.t) alerts = Error.catch_warnings (fun () -> let status = { tags_allowed; parent_of_sections } in - let ast, tags = strip_internal_tags ast in + let ast, tags = strip_internal_tags (merge_ast ast) in let elts = top_level_block_elements status ast |> append_alerts_to_comment alerts in diff --git a/src/model/semantics.mli b/src/model/semantics.mli index 09d750da92..f47c4bd87e 100644 --- a/src/model/semantics.mli +++ b/src/model/semantics.mli @@ -11,6 +11,11 @@ type sections_allowed = [ `All | `No_titles | `None ] type alerts = [ `Tag of [ `Alert of string * string option ] ] Location_.with_location list +val merge_ast : Odoc_parser.Ast.t -> Odoc_parser.Ast.t +(** Merge runs of [`Word]/[`Space] into single [`Word]s. Idempotent; the loader + applies it before its parse cache so that repeated comments share the merged + nodes. *) + val ast_to_comment : internal_tags:'tags handle_internal_tags -> tags_allowed:bool -> diff --git a/src/model_desc/comment_desc.ml b/src/model_desc/comment_desc.ml index d72e20fc9e..ff21298f0f 100644 --- a/src/model_desc/comment_desc.ml +++ b/src/model_desc/comment_desc.ml @@ -6,7 +6,7 @@ open Paths_desc let ignore_loc x = x.Location_.value type general_inline_element = - [ `Space + [ `Space of string | `Word of string | `Code_span of string | `Math_span of string @@ -72,7 +72,7 @@ let rec inline_element : general_inline_element t = in Variant (function - | `Space -> C0 "`Space" + | `Space s -> C ("`Space", s, string) | `Word x -> C ("`Word", x, string) | `Code_span x -> C ("`Code_span", x, string) | `Math_span x -> C ("`Math_span", x, string) diff --git a/src/odoc/odoc_link.ml b/src/odoc/odoc_link.ml index f51f1fa144..d04049f2ec 100644 --- a/src/odoc/odoc_link.ml +++ b/src/odoc/odoc_link.ml @@ -27,11 +27,11 @@ let content_for_hidden_modules = let sentence = [ `Word "This"; - `Space; + `Space " "; `Word "module"; - `Space; + `Space " "; `Word "is"; - `Space; + `Space " "; `Word "hidden."; ] in diff --git a/src/search/text.ml b/src/search/text.ml index da112c39e7..5a1c5991e2 100644 --- a/src/search/text.ml +++ b/src/search/text.ml @@ -72,7 +72,7 @@ module Of_comments = struct | `Code_span s -> s | `Word w -> w | `Math_span m -> m - | `Space -> " " + | `Space s -> s | `Reference (_, c) -> link_content c | `Link (_, c) -> link_content c | `Styled (_, b) -> inlines b diff --git a/src/xref2/link.ml b/src/xref2/link.ml index 2620a49065..7cda304519 100644 --- a/src/xref2/link.ml +++ b/src/xref2/link.ml @@ -232,6 +232,78 @@ and module_path : Env.t -> Paths.Path.Module.t -> Paths.Path.Module.t = Errors.report ~what:(`Module_path cp) ~tools_error:e `Resolve; p) +(* Comment.docs produced by Doc_attr can be huge in ppx_template-heavy code + (Container_intf in OxCaml's base has ~155K doc-comment instances), and the vast + majority of them are plain prose that has nothing for this module to do: + no references to resolve, no headings to check for ambiguity, no + {!modules ...} lists to resolve. Rebuilding such a doc word-by-word via + the List.map below is pure overhead, so we short-circuit and return the + input unchanged whenever it contains none of the constructs that this + pass actually touches. *) +let rec comment_inline_element_needs_resolving (x : Comment.inline_element) = + match x with + | `Reference _ -> true + | `Styled (_, xs) -> + List.exists + (fun e -> comment_inline_element_needs_resolving e.Location_.value) + xs + | `Space _ | `Word _ | `Code_span _ | `Math_span _ | `Raw_markup _ | `Link _ + -> + false + +let rec comment_nestable_block_element_needs_resolving + (x : Comment.nestable_block_element) = + match x with + | `Paragraph elts -> + List.exists + (fun e -> comment_inline_element_needs_resolving e.Location_.value) + elts + | `List (_, yss) -> + List.exists + (List.exists (fun e -> + comment_nestable_block_element_needs_resolving e.Location_.value)) + yss + | `Table { data; _ } -> + List.exists + (List.exists (fun (cell, _) -> + List.exists + (fun e -> + comment_nestable_block_element_needs_resolving + e.Location_.value) + cell)) + data + | `Modules _ -> true + | `Media (`Reference _, _, _) -> true + | `Media (`Link _, _, _) -> false + | `Code_block _ | `Verbatim _ | `Math_block _ -> false + +let comment_tag_needs_resolving (x : Comment.tag) = + match x with + | `Raise (`Reference _, _) -> true + | `Raise (`Code_span _, c) + | `Deprecated c + | `Param (_, c) + | `Return c + | `See (_, _, c) + | `Before (_, c) -> + List.exists + (fun e -> + comment_nestable_block_element_needs_resolving e.Location_.value) + c + | `Author _ | `Since _ | `Version _ | `Alert _ -> false + +let comment_block_element_needs_resolving (x : Comment.block_element) = + match x with + | #Comment.nestable_block_element as x -> + comment_nestable_block_element_needs_resolving x + | `Heading _ -> true + | `Tag t -> comment_tag_needs_resolving t + +let doc_needs_resolving (d : Comment.docs) = + List.exists + (fun e -> comment_block_element_needs_resolving e.Location_.value) + d.Comment.elements + let rec comment_inline_element : loc:_ -> Env.t -> @@ -412,16 +484,18 @@ and with_location : type a. { value; location = loc } and comment_docs env parent d = - { - Comment.elements = - List.rev_map - (with_location - (comment_block_element env d.Comment.warnings_tag - (parent :> Id.LabelParent.t))) - d.Comment.elements - |> List.rev; - warnings_tag = d.warnings_tag; - } + if not (doc_needs_resolving d) then d + else + { + Comment.elements = + List.rev_map + (with_location + (comment_block_element env d.Comment.warnings_tag + (parent :> Id.LabelParent.t))) + d.Comment.elements + |> List.rev; + warnings_tag = d.warnings_tag; + } and comment env parent = function | `Stop -> `Stop diff --git a/test/frontmatter/frontmatter.t/run.t b/test/frontmatter/frontmatter.t/run.t index d3a9cab135..9d1e02b64e 100644 --- a/test/frontmatter/frontmatter.t/run.t +++ b/test/frontmatter/frontmatter.t/run.t @@ -57,11 +57,7 @@ When there is one frontmatter, it is extracted from the content: }, [ { - "`Word": "One" - }, - "`Space", - { - "`Word": "frontmatter" + "`Word": "One frontmatter" } ] ] @@ -112,11 +108,7 @@ When there is more than one children order, we raise a warning and keep only the }, [ { - "`Word": "Two" - }, - "`Space", - { - "`Word": "frontmatters" + "`Word": "Two frontmatters" } ] ] diff --git a/test/frontmatter/short_title.t/run.t b/test/frontmatter/short_title.t/run.t index 67f3a0e3b6..8fdc47a0f4 100644 --- a/test/frontmatter/short_title.t/run.t +++ b/test/frontmatter/short_title.t/run.t @@ -6,7 +6,7 @@ Normal use > EOF $ odoc compile --parent-id pkg --output-dir _odoc index.mld $ odoc_print _odoc/pkg/page-index.odoc | jq .frontmatter.short_title -c - {"Some":[{"`Word":"First"},"`Space",{"`Word":"try"}]} + {"Some":[{"`Word":"First"},{"`Space":" "},{"`Word":"try"}]} With inline content @@ -16,7 +16,7 @@ With inline content > EOF $ odoc compile --parent-id pkg --output-dir _odoc index.mld $ odoc_print _odoc/pkg/page-index.odoc | jq .frontmatter.short_title -c - {"Some":[{"`Word":"with"},"`Space",{"`Code_span":"code"},"`Space",{"`Word":"and"},"`Space",{"`Styled":["`Emphasis",[{"`Word":"emphasized"}]]},"`Space",{"`Word":"content"}]} + {"Some":[{"`Word":"with"},{"`Space":" "},{"`Code_span":"code"},{"`Space":" "},{"`Word":"and"},{"`Space":" "},{"`Styled":["`Emphasis",[{"`Word":"emphasized"}]]},{"`Space":" "},{"`Word":"content"}]} With reference or link @@ -26,7 +26,7 @@ With reference or link > EOF $ odoc compile --parent-id pkg --output-dir _odoc index.mld $ odoc_print _odoc/pkg/page-index.odoc | jq .frontmatter.short_title -c - {"Some":[{"`Word":"with"},"`Space","`Space",{"`Word":"and"},"`Space"]} + {"Some":[{"`Word":"with"},{"`Space":" "},{"`Space":" "},{"`Word":"and"},{"`Space":" "}]} With other block diff --git a/test/generators/html/Alias-X.html b/test/generators/html/Alias-X.html index 5f50308e96..2ca26c3fe8 100644 --- a/test/generators/html/Alias-X.html +++ b/test/generators/html/Alias-X.html @@ -24,8 +24,9 @@

Module Alias.X

-

Module Foo__X documentation. This should appear in the documentation - for the alias to this module 'X' +

+ Module Foo__X documentation. This should appear in the documentation + for the alias to this module 'X'

diff --git a/test/generators/html/Bugs.html b/test/generators/html/Bugs.html index e5effe9435..2b4fc369f0 100644 --- a/test/generators/html/Bugs.html +++ b/test/generators/html/Bugs.html @@ -61,8 +61,8 @@

Module Bugs

Renders as - val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f before - https://github.com/ocaml/odoc/pull/1173 + val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f + before https://github.com/ocaml/odoc/pull/1173

diff --git a/test/generators/html/Bugs_post_406.html b/test/generators/html/Bugs_post_406.html index 56a7911823..139343d6fc 100644 --- a/test/generators/html/Bugs_post_406.html +++ b/test/generators/html/Bugs_post_406.html @@ -13,8 +13,9 @@

Module Bugs_post_406

-

Let-open in class types, https://github.com/ocaml/odoc/issues/543 - This was added to the language in 4.06 +

+ Let-open in class types, https://github.com/ocaml/odoc/issues/543 This + was added to the language in 4.06

diff --git a/test/generators/html/Include2-Y_include_doc.html b/test/generators/html/Include2-Y_include_doc.html index ff7dc46aa2..e080ccc07f 100644 --- a/test/generators/html/Include2-Y_include_doc.html +++ b/test/generators/html/Include2-Y_include_doc.html @@ -18,8 +18,8 @@

Module Include2.Y_include_doc

-

Doc attached to include Y. Y's top-comment - shouldn't appear here. +

Doc attached to include Y. Y + 's top-comment shouldn't appear here.

diff --git a/test/generators/html/Include2.html b/test/generators/html/Include2.html index 796267f1e6..2bd9e18f8a 100644 --- a/test/generators/html/Include2.html +++ b/test/generators/html/Include2.html @@ -79,8 +79,8 @@

Module Include2

-

The include Y below should have the synopsis from - Y's top-comment attached to it. +

The include Y below should have the synopsis from + Y's top-comment attached to it.

diff --git a/test/generators/html/Include_sections.html b/test/generators/html/Include_sections.html index 1a35212b57..faf8429b38 100644 --- a/test/generators/html/Include_sections.html +++ b/test/generators/html/Include_sections.html @@ -93,8 +93,9 @@

Something 1-bis

Some text.

-

And let's include it again, but without inlining it this time: - the ToC shouldn't grow. +

+ And let's include it again, but without inlining it this time: the ToC + shouldn't grow.

diff --git a/test/generators/html/Markup.html b/test/generators/html/Markup.html index 2849b4c313..cbde3ab73c 100644 --- a/test/generators/html/Markup.html +++ b/test/generators/html/Markup.html @@ -70,43 +70,47 @@

Module Markup

Sections

-

Let's get these done first, because sections will be used to break - up the rest of this test. +

+ Let's get these done first, because sections will be used to break up the + rest of this test.

Besides the section heading above, there are also

Subsection headings

and

- Sub-subsection - headings + + Sub-subsection headings

-

but odoc has banned deeper headings. There are also title headings, - but they are only allowed in mld files. +

+ but odoc has banned deeper headings. There are also title headings, but + they are only allowed in mld files.

Anchors

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. + Anchors, and it is possible to + link + to them. Links to section headers should not be set in source code + style.

Paragraph

Individual paragraphs can have a heading.

Subparagraph
-

Parts of a longer paragraph that can be considered alone can also - have headings. +

+ Parts of a longer paragraph that can be considered alone can also have + headings.

Styling

This paragraph has some styled elements: bold and italic , bold italic, emphasis, emphasis within emphasis, bold italic, superscript, subscript - . The line spacing should be enough for superscripts and subscripts - not to look odd. + . The line spacing should be enough for superscripts and subscripts not + to look odd.

Note: In italics emphasis is rendered as normal text while - emphasis in emphasis is rendered in - italics. + emphasis in emphasis + is rendered in italics. It also work the same in links in italics with @@ -114,55 +118,57 @@

-

code is a different kind of markup that doesn't allow - nested markup. +

code + is a different kind of markup that doesn't allow nested markup.

It's possible for two markup elements to appear next to - each other and have a space, and appear nextto each - other with no space. It doesn't matter how much space - it was in the source: in this sentence, it was two space characters. - And in this one, there is a newline. + each other and have a space, and appear nextto + each other with no space. It doesn't matter how much + space it was in the source: in this sentence, it was two space + characters. And in this one, there is a newline.

-

This is also true between non-code markup - and code. +

This is also true between non-code markup + and code.

-

Code can appear inside other markup. Its display - shouldn't be affected. +

Code can appear inside other markup + . Its display shouldn't be affected.

There is no differences between a b and a b.

-

Consecutive whitespaces not after a newline are conserved as they - are: a b. +

Consecutive whitespaces not after a newline are conserved as they are: + a b.

-

This is a link. It sends you to the top of this - page. Links can have markup inside them: bold - , italics, emphasis - , superscript, +

This is a link + . It sends you to the top of this page. Links can have markup inside + them: bold, italics + , emphasis, + superscript, subscript, and code. Links can also be nested - inside markup. Links cannot be nested inside - each other. This link has no replacement text: # + 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. - 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: +

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, superscript, subscript, 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. + 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.

Preformatted text @@ -185,9 +191,9 @@

Lists

  • and the paragraphs in each list item support styling.
    1. This is a
    2. shorthand numbered list.

    just creates a paragraph outside the list.

    @@ -208,8 +214,8 @@

    Lists

    The parser supports any ASCII-compatible encoding.

    In particuλar UTF-8.

    Raw HTML

    -

    Raw HTML can be as inline - elements into sentences. +

    Raw HTML can be + as inline elements into sentences.

    @@ -257,27 +263,31 @@

    Math

    -

    A much longer paragraph which will need to be wrapped and more - content and more content and some different content and we will - see what is does if we can see it +

    + A much longer paragraph which will need to be wrapped and more content + and more content and some different content and we will see what is + does if we can see it

    -

    B much longer paragraph which will need to be wrapped and more - content and more content and some different content and we will - see what is does if we can see it +

    + B much longer paragraph which will need to be wrapped and more content + and more content and some different content and we will see what is + does if we can see it

    -

    C much longer paragraph which will need to be wrapped and more - content and more content and some different content and we will - see what is does if we can see it +

    + C much longer paragraph which will need to be wrapped and more content + and more content and some different content and we will see what is + does if we can see it

    -

    D much longer paragraph which will need to be wrapped and more - content and more content and some different content and we will - see what is does if we can see it +

    + D much longer paragraph which will need to be wrapped and more content + and more content and some different content and we will see what is + does if we can see it

    diff --git a/test/generators/html/Module.html b/test/generators/html/Module.html index c060d3c2b6..5a67f02efe 100644 --- a/test/generators/html/Module.html +++ b/test/generators/html/Module.html @@ -21,8 +21,9 @@

    Module Module

    Foo.

    val foo : unit
    -

    The module needs at least one signature item, otherwise a bug - causes the compiler to drop the module comment (above). See +

    + 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 . diff --git a/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigA.html b/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigA.html index 0990a96216..6c28823ad0 100644 --- a/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigA.html +++ b/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigA.html @@ -26,8 +26,8 @@

    Module type SuperSig.SubSigA

    -

    A Labeled Section - Header Inside of a Signature +

    + A Labeled Section Header Inside of a Signature

    diff --git a/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigB.html b/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigB.html index 0ceaa44c14..237702ab3b 100644 --- a/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigB.html +++ b/test/generators/html/Ocamlary-module-type-SuperSig-module-type-SubSigB.html @@ -28,8 +28,8 @@

    Module type SuperSig.SubSigB

    -

    Another Labeled - Section Header Inside of a Signature +

    + Another Labeled Section Header Inside of a Signature

    diff --git a/test/generators/html/Ocamlary.html b/test/generators/html/Ocamlary.html index d248ffd6d2..55b8a278f1 100644 --- a/test/generators/html/Ocamlary.html +++ b/test/generators/html/Ocamlary.html @@ -59,8 +59,8 @@

    Module Ocamlary

  • Trying the {!modules: ...} command. @@ -75,8 +75,7 @@

    Module Ocamlary

  • -

    You may find more information about this HTML documentation renderer - at +

    You may find more information about this HTML documentation renderer at github.com/dsheets/ocamlary .

    This is some verbatim text:

    verbatim
    @@ -271,8 +270,8 @@

    EmptySig

    or SuperSig.EmptySig - . Section Section 9000 is - also interesting. EmptySig + . Section Section 9000 + is also interesting. EmptySig is the section and EmptySig is the module signature. @@ -296,8 +295,7 @@

    EmptySig

    Some text before exception title.

    - Basic exception - stuff + Basic exception stuff

    After exception title.

    @@ -343,8 +341,8 @@

    EmptySig is a module and - EmptySig is this - exception. + EmptySig + is this exception.

    @@ -381,8 +379,8 @@

    -

    a_function is this - type and a_function +

    a_function + is this type and a_function is the value below.

    @@ -650,8 +648,7 @@

    - Advanced Module - Stuff + Advanced Module Stuff

    @@ -2713,14 +2710,16 @@

    -

    Trying - the {!modules: ...} command. +

    + Trying the {!modules: ...} command.

    -

    With ocamldoc, toplevel units will be linked and documented, while - submodules will behave as simple references. +

    + With ocamldoc, toplevel units will be linked and documented, while + submodules will behave as simple references.

    -

    With odoc, everything should be resolved (and linked) but only - toplevel units will be documented. +

    + With odoc, everything should be resolved (and linked) but only toplevel + units will be documented.

    @@ -2748,8 +2747,8 @@

  • Dep4.X
  • - Playing - with @canonical paths + + Playing with @canonical paths

    @@ -2793,13 +2792,13 @@

    Aliases again

    Let's imitate jst's layout.

    - Section title - splicing + + Section title splicing

    I can refer to

    - New reference - syntax + New reference syntax

    diff --git a/test/generators/html/Oxcaml-M1.html b/test/generators/html/Oxcaml-M1.html index cc5046421f..fa8b651961 100644 --- a/test/generators/html/Oxcaml-M1.html +++ b/test/generators/html/Oxcaml-M1.html @@ -69,8 +69,8 @@

    Module Oxcaml.M1

    -

    uncontended and nonportable are the defaults - (not rendered). +

    uncontended and nonportable + are the defaults (not rendered).

    diff --git a/test/generators/html/Oxcaml-M2.html b/test/generators/html/Oxcaml-M2.html index 5d8a178da1..779b780b41 100644 --- a/test/generators/html/Oxcaml-M2.html +++ b/test/generators/html/Oxcaml-M2.html @@ -14,8 +14,9 @@

    Module Oxcaml.M2

    -

    Module with portable modality. The modality is applied - to all value members of M2. +

    Module with portable + modality. The modality is applied to all value members of + M2.

    diff --git a/test/generators/html/Oxcaml-M3.html b/test/generators/html/Oxcaml-M3.html index e65c6b11fa..62aff8716e 100644 --- a/test/generators/html/Oxcaml-M3.html +++ b/test/generators/html/Oxcaml-M3.html @@ -14,8 +14,9 @@

    Module Oxcaml.M3

    -

    contended modality applied to all definitions in the - module, except the ones which have already specified this axis. +

    contended + modality applied to all definitions in the module, except the ones which + have already specified this axis.

    diff --git a/test/generators/html/Oxcaml-module-type-S.html b/test/generators/html/Oxcaml-module-type-S.html index 985703c18f..a21cb480c3 100644 --- a/test/generators/html/Oxcaml-module-type-S.html +++ b/test/generators/html/Oxcaml-module-type-S.html @@ -68,8 +68,8 @@

    Module type Oxcaml.S

    -

    uncontended and nonportable are the defaults - (not rendered). +

    uncontended and nonportable + are the defaults (not rendered).

    @@ -279,8 +279,8 @@

    - Kind - annotations with modalities + + Kind annotations with modalities

    @@ -439,9 +439,9 @@

    -

    A with constraint whose right-hand side is a - parameterized type constructor (as found in base's - Map module). +

    A with + constraint whose right-hand side is a parameterized type constructor + (as found in base's Map module).

    @@ -456,8 +456,8 @@

    -

    A with constraint whose right-hand side applies - a type constructor. +

    A with + constraint whose right-hand side applies a type constructor.

    @@ -474,8 +474,8 @@

    -

    A with constraint whose right-hand side is an arrow - type. +

    A with + constraint whose right-hand side is an arrow type.

    @@ -493,8 +493,8 @@

    -

    A with constraint whose right-hand side is an arrow - type carrying a mode. +

    A with + constraint whose right-hand side is an arrow type carrying a mode.

    @@ -542,8 +542,9 @@

    -

    A with constraint referring to a type through a - module path (M.t). +

    A with + constraint referring to a type through a module path (M.t + ).

    @@ -603,8 +604,9 @@

    -

    A with constraint referring to a type through a - functor application (F(X).t). +

    A with + constraint referring to a type through a functor application ( + F(X).t).

    @@ -621,8 +623,8 @@

    -

    A with constraint whose right-hand side is a polymorphic - variant. +

    A with + constraint whose right-hand side is a polymorphic variant.

    @@ -637,14 +639,14 @@

    -

    A with constraint whose right-hand side is an object - type. +

    A with + constraint whose right-hand side is an object type.

    - Kind - annotations on type aliases + + Kind annotations on type aliases

    @@ -769,8 +771,8 @@

    Zero alloc

    -

    Zero allocation bindings have an extension attribute attached. - See +

    + Zero allocation bindings have an extension attribute attached. See https://oxcaml.org/documentation/miscellaneous-extensions/zero_alloc_check/

    @@ -1078,8 +1080,8 @@

    Modalities

    - Multiple - modalities on a field + + Multiple modalities on a field

    @@ -1354,8 +1356,7 @@

    - Modalities on - values + Modalities on values

    @@ -1410,8 +1411,9 @@

    -

    Module with portable modality. The modality is applied - to all value members of M2. +

    Module with portable + modality. The modality is applied to all value members of + M2.

    @@ -1428,9 +1430,9 @@

    -

    contended modality applied to all definitions in - the module, except the ones which have already specified this - axis. +

    contended + modality applied to all definitions in the module, except the ones + which have already specified this axis.

    Modes

    @@ -1490,8 +1492,8 @@

    -

    Same as mode_multi, to show that modes order is - normalized. +

    Same as mode_multi + , to show that modes order is normalized.

    @@ -1553,20 +1555,22 @@

    -

    Mode on a result that is itself an arrow. The arrow must be - parenthesized so the mode does not appear to bind to the inner - return type. +

    + Mode on a result that is itself an arrow. The arrow must be + parenthesized so the mode does not appear to bind to the inner return + type.

    - Curry-implied - result modes + + Curry-implied result modes

    -

    Closing over an argument constrains the partial-application closure - across several axes, not just locality. When the result mode is - the one currying implies from the argument, it is suppressed (as - the compiler does). +

    + Closing over an argument constrains the partial-application closure + across several axes, not just locality. When the result mode is the one + currying implies from the argument, it is suppressed (as the compiler + does).

    @@ -1582,8 +1586,8 @@

    -

    once argument: the implied once result - mode is suppressed. +

    once argument: the implied once + result mode is suppressed.

    @@ -1601,8 +1605,8 @@

    -

    portable argument: the implied result mode is - suppressed. +

    portable + argument: the implied result mode is suppressed.

    @@ -1620,18 +1624,19 @@

    -

    contended argument: the implied result mode is - suppressed. +

    contended + argument: the implied result mode is suppressed.

    - Result modes - that are kept + + Result modes that are kept

    -

    A result mode is only suppressed when it is exactly the one currying - implies. An explicit mode on a different axis is kept (and the arrow - result is parenthesized). +

    + A result mode is only suppressed when it is exactly the one currying + implies. An explicit mode on a different axis is kept (and the arrow + result is parenthesized).

    @@ -1682,8 +1687,8 @@

    -

    The curry-implied once is suppressed, but the explicit - portable is kept. +

    The curry-implied once is suppressed, but the explicit + portable is kept.

    @@ -1702,8 +1707,8 @@

    -

    The curry-implied local is suppressed, but the explicit - portable is kept. +

    The curry-implied local is suppressed, but the explicit + portable is kept.

    @@ -1723,9 +1728,9 @@

    -

    The nonportable argument mode is the default and - dropped, while the explicit portable result, not - implied by currying, is kept. +

    The nonportable + argument mode is the default and dropped, while the explicit + portable result, not implied by currying, is kept.

    @@ -1899,8 +1904,8 @@

    -

    Fork mode (identity on a non-local argument, not - rendered). +

    Fork mode (identity on a non-local + argument, not rendered).

    @@ -1966,8 +1971,8 @@

    -

    Statefulness mode (identity when portability is - at its default, not rendered). +

    Statefulness mode (identity when portability + is at its default, not rendered).

    @@ -2027,11 +2032,12 @@

    Staticity mode (legacy, not rendered).

    - Cross-axis - suppression + + Cross-axis suppression

    -

    Some axes have a default value that is implied by another axis; - the implied value is suppressed when rendering. +

    + Some axes have a default value that is implied by another axis; the + implied value is suppressed when rendering.

    @@ -2044,8 +2050,8 @@

    -

    yielding is the default for local, - so it is not rendered. +

    yielding is the default for local + , so it is not rendered.

    @@ -2131,8 +2137,8 @@

    - Modes in - type definitions + + Modes in type definitions

    diff --git a/test/generators/html/Oxcaml_impl.html b/test/generators/html/Oxcaml_impl.html index 9fde4ca6d5..f6ea7ce3b9 100644 --- a/test/generators/html/Oxcaml_impl.html +++ b/test/generators/html/Oxcaml_impl.html @@ -24,8 +24,8 @@

    Module Oxcaml_impl

  • - Modalities on - constructor arguments + + Modalities on constructor arguments
  • @@ -88,8 +88,8 @@

    Module Oxcaml_impl

    Modalities

    - Modalities - on record fields + + Modalities on record fields

    @@ -196,8 +196,8 @@

    Modes

    - Modes in - type definitions + + Modes in type definitions

    diff --git a/test/generators/html/Section.html b/test/generators/html/Section.html index 47e3268602..e473022a2b 100644 --- a/test/generators/html/Section.html +++ b/test/generators/html/Section.html @@ -13,8 +13,8 @@

    Module Section

    -

    This is the module comment. Eventually, sections won't be allowed - in it. +

    + This is the module comment. Eventually, sections won't be allowed in it.

    @@ -27,8 +27,8 @@

    Module Section

  • within a comment @@ -64,16 +64,17 @@

    within a comment

    - and one - with a nested section + + and one with a nested section

    This section title has markup

    -

    But links are impossible thanks to the parser, so we never have - trouble rendering a section title in a table of contents - no link - will be nested inside another link. +

    + But links are impossible thanks to the parser, so we never have trouble + rendering a section title in a table of contents - no link will be nested + inside another link.

  • diff --git a/test/generators/html/Stop.html b/test/generators/html/Stop.html index 9675d86080..a612a352ca 100644 --- a/test/generators/html/Stop.html +++ b/test/generators/html/Stop.html @@ -22,16 +22,18 @@

    Module Stop

    val foo : int

    This is normal commented text.

    -

    The next value is bar, and it should be missing from - the documentation. There is also an entire module, M - , which should also be hidden. It contains a nested stop comment, - but that stop comment should not turn documentation back on in this - outer module, because stop comments respect scope. +

    The next value is bar + , and it should be missing from the documentation. There is also an + entire module, M + , which should also be hidden. It contains a nested stop comment, but + that stop comment should not turn documentation back on in this outer + module, because stop comments respect scope.

    Documentation is on again.

    -

    Now, we have a nested module, and it has a stop comment between - its two items. We want to see that the first item is displayed, - but the second is missing, and the stop comment disables documenation - only in that module, and not in this outer module. +

    + Now, we have a nested module, and it has a stop comment between its two + items. We want to see that the first item is displayed, but the second is + missing, and the stop comment disables documenation only in that module, + and not in this outer module.

    @@ -52,9 +54,9 @@

    Module Stop

    The first comment can also be a stop-comment. The test case - stop_first_comment.mli is testing the same thing but - at the toplevel. We should see bar inside - O. + stop_first_comment.mli + is testing the same thing but at the toplevel. We should see + bar inside O.

    diff --git a/test/generators/html/Toplevel_comments-Comments_on_open.html b/test/generators/html/Toplevel_comments-Comments_on_open.html index 61397c8b5f..4190d49012 100644 --- a/test/generators/html/Toplevel_comments-Comments_on_open.html +++ b/test/generators/html/Toplevel_comments-Comments_on_open.html @@ -36,8 +36,8 @@

    Module Toplevel_comments.Comments_on_open

    Section

    -

    Comments attached to open are treated as floating comments. Referencing - Section +

    Comments attached to open are treated as floating comments. Referencing + Section M.t works diff --git a/test/generators/html/Toplevel_comments-Ref_in_synopsis.html b/test/generators/html/Toplevel_comments-Ref_in_synopsis.html index 4e1a548220..958e6dd9ba 100644 --- a/test/generators/html/Toplevel_comments-Ref_in_synopsis.html +++ b/test/generators/html/Toplevel_comments-Ref_in_synopsis.html @@ -16,8 +16,9 @@

    Module Toplevel_comments.Ref_in_synopsis

    t.

    -

    This reference should resolve in the context of this module, even - when used as a synopsis. +

    + This reference should resolve in the context of this module, even when + used as a synopsis.

    diff --git a/test/generators/html/Toplevel_comments.html b/test/generators/html/Toplevel_comments.html index de6d0bcdb6..028b9b5de3 100644 --- a/test/generators/html/Toplevel_comments.html +++ b/test/generators/html/Toplevel_comments.html @@ -13,8 +13,9 @@

    Module Toplevel_comments

    -

    A doc comment at the beginning of a module is considered to be - that module's doc. +

    + A doc comment at the beginning of a module is considered to be that + module's doc.

    diff --git a/test/generators/html/mld.html b/test/generators/html/mld.html index a0db6b7251..8bb075a411 100644 --- a/test/generators/html/mld.html +++ b/test/generators/html/mld.html @@ -13,8 +13,9 @@

    Mld Page

    -

    This is an .mld file. It doesn't have an auto-generated - title, like modules and other pages generated fully by odoc do. +

    This is an .mld + file. It doesn't have an auto-generated title, like modules and other + pages generated fully by odoc do.

    It will have a TOC generated from section headings.

    diff --git a/test/generators/markdown/Bugs_post_406.md b/test/generators/markdown/Bugs_post_406.md index 830abc9576..23b5a1f097 100644 --- a/test/generators/markdown/Bugs_post_406.md +++ b/test/generators/markdown/Bugs_post_406.md @@ -1,7 +1,7 @@ # Module `Bugs_post_406` -Let-open in class types, https://github.com/ocaml/odoc/issues/543 This was added to the language in 4\.06 +Let-open in class types, https://github.com/ocaml/odoc/issues/543 This was added to the language in 4.06 ```ocaml class type let_open = object ... end diff --git a/test/generators/markdown/Ocamlary.md b/test/generators/markdown/Ocamlary.md index 4809422a63..0150ebe3f6 100644 --- a/test/generators/markdown/Ocamlary.md +++ b/test/generators/markdown/Ocamlary.md @@ -213,7 +213,7 @@ since mesozoic ```ocaml val changing : unit ``` -This value has had changes in 1\.0.0, 1\.1.0, and 1\.2.0. +This value has had changes in 1.0.0, 1.1.0, and 1.2.0. before 1\.0.0 before 1.0.0 before 1\.1.0 before 1.1.0 @@ -370,7 +370,7 @@ type poly_variant = [ ``` This comment is for `poly_variant`. -Wow\! It was a polymorphic variant\! +Wow! It was a polymorphic variant\! ```ocaml type (_, _) full_gadt = @@ -381,7 +381,7 @@ type (_, _) full_gadt = ``` This comment is for `full_gadt`. -Wow\! It was a GADT\! +Wow! It was a GADT\! ```ocaml type 'a partial_gadt = @@ -391,7 +391,7 @@ type 'a partial_gadt = ``` This comment is for `partial_gadt`. -Wow\! It was a mixed GADT\! +Wow! It was a mixed GADT\! ```ocaml type alias = variant diff --git a/test/generators/markdown/Section.md b/test/generators/markdown/Section.md index 86f93388af..691f5eb0d2 100644 --- a/test/generators/markdown/Section.md +++ b/test/generators/markdown/Section.md @@ -34,4 +34,4 @@ val foo : unit ## *This* `section` **title** has markup -But links are impossible thanks to the parser, so we never have trouble rendering a section title in a table of contents \- no link will be nested inside another link. +But links are impossible thanks to the parser, so we never have trouble rendering a section title in a table of contents - no link will be nested inside another link. diff --git a/test/generators/markdown/Toplevel_comments-Alias.md b/test/generators/markdown/Toplevel_comments-Alias.md index 4d2d95bfd0..795226693a 100644 --- a/test/generators/markdown/Toplevel_comments-Alias.md +++ b/test/generators/markdown/Toplevel_comments-Alias.md @@ -3,7 +3,7 @@ Doc of `Alias`. -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml type t diff --git a/test/generators/markdown/Toplevel_comments-Include_inline'.md b/test/generators/markdown/Toplevel_comments-Include_inline'.md index 4c9c0c711d..ce00d0e002 100644 --- a/test/generators/markdown/Toplevel_comments-Include_inline'.md +++ b/test/generators/markdown/Toplevel_comments-Include_inline'.md @@ -1,9 +1,9 @@ # Module `Toplevel_comments.Include_inline'` -Doc of `Include_inline`, part 1\. +Doc of `Include_inline`, part 1. -Doc of `Include_inline`, part 2\. +Doc of `Include_inline`, part 2. part 3 diff --git a/test/generators/markdown/Toplevel_comments-Include_inline.md b/test/generators/markdown/Toplevel_comments-Include_inline.md index b1a9e3d7cf..410bd13533 100644 --- a/test/generators/markdown/Toplevel_comments-Include_inline.md +++ b/test/generators/markdown/Toplevel_comments-Include_inline.md @@ -1,7 +1,7 @@ # Module `Toplevel_comments.Include_inline` -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml type t diff --git a/test/generators/markdown/Toplevel_comments-M''.md b/test/generators/markdown/Toplevel_comments-M''.md index f7bab20ccb..9f44d0274a 100644 --- a/test/generators/markdown/Toplevel_comments-M''.md +++ b/test/generators/markdown/Toplevel_comments-M''.md @@ -1,6 +1,6 @@ # Module `Toplevel_comments.M''` -Doc of `M''`, part 1\. +Doc of `M''`, part 1. -Doc of `M''`, part 2\. +Doc of `M''`, part 2. diff --git a/test/generators/markdown/Toplevel_comments-class-c1.md b/test/generators/markdown/Toplevel_comments-class-c1.md index 62aa29ec09..185ffb6a53 100644 --- a/test/generators/markdown/Toplevel_comments-class-c1.md +++ b/test/generators/markdown/Toplevel_comments-class-c1.md @@ -1,6 +1,6 @@ # Class `Toplevel_comments.c1` -Doc of `c1`, part 1\. +Doc of `c1`, part 1. -Doc of `c1`, part 2\. +Doc of `c1`, part 2. diff --git a/test/generators/markdown/Toplevel_comments-class-c2.md b/test/generators/markdown/Toplevel_comments-class-c2.md index 8d3333b909..25ec4a2b91 100644 --- a/test/generators/markdown/Toplevel_comments-class-c2.md +++ b/test/generators/markdown/Toplevel_comments-class-c2.md @@ -3,4 +3,4 @@ Doc of `c2`. -Doc of `ct`, part 2\. +Doc of `ct`, part 2. diff --git a/test/generators/markdown/Toplevel_comments-class-type-ct.md b/test/generators/markdown/Toplevel_comments-class-type-ct.md index 0aa4473ede..cb798aaa33 100644 --- a/test/generators/markdown/Toplevel_comments-class-type-ct.md +++ b/test/generators/markdown/Toplevel_comments-class-type-ct.md @@ -1,6 +1,6 @@ # Class type `Toplevel_comments.ct` -Doc of `ct`, part 1\. +Doc of `ct`, part 1. -Doc of `ct`, part 2\. +Doc of `ct`, part 2. diff --git a/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T'.md b/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T'.md index 65c8d7aeff..16cf712372 100644 --- a/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T'.md +++ b/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T'.md @@ -1,9 +1,9 @@ # Module type `Toplevel_comments.Include_inline_T'` -Doc of `Include_inline_T'`, part 1\. +Doc of `Include_inline_T'`, part 1. -Doc of `Include_inline_T'`, part 2\. +Doc of `Include_inline_T'`, part 2. part 3 diff --git a/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T.md b/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T.md index 43d9ef28cd..a87b344d60 100644 --- a/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T.md +++ b/test/generators/markdown/Toplevel_comments-module-type-Include_inline_T.md @@ -1,7 +1,7 @@ # Module type `Toplevel_comments.Include_inline_T` -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml type t diff --git a/test/generators/markdown/Toplevel_comments-module-type-T.md b/test/generators/markdown/Toplevel_comments-module-type-T.md index 2213c89cc4..96b39159a4 100644 --- a/test/generators/markdown/Toplevel_comments-module-type-T.md +++ b/test/generators/markdown/Toplevel_comments-module-type-T.md @@ -1,9 +1,9 @@ # Module type `Toplevel_comments.T` -Doc of `T`, part 1\. +Doc of `T`, part 1. -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml type t diff --git a/test/generators/markdown/Toplevel_comments.md b/test/generators/markdown/Toplevel_comments.md index cba8aa24c6..c0d64f3401 100644 --- a/test/generators/markdown/Toplevel_comments.md +++ b/test/generators/markdown/Toplevel_comments.md @@ -6,27 +6,27 @@ A doc comment at the beginning of a module is considered to be that module's doc ```ocaml module type T = sig ... end ``` -Doc of `T`, part 1\. +Doc of `T`, part 1. ```ocaml module Include_inline : sig ... end ``` -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml module Include_inline' : sig ... end ``` -Doc of `Include_inline`, part 1\. +Doc of `Include_inline`, part 1. ```ocaml module type Include_inline_T = sig ... end ``` -Doc of `T`, part 2\. +Doc of `T`, part 2. ```ocaml module type Include_inline_T' = sig ... end ``` -Doc of `Include_inline_T'`, part 1\. +Doc of `Include_inline_T'`, part 1. ```ocaml module M : sig ... end @@ -41,7 +41,7 @@ Doc of `M'` from outside ```ocaml module M'' : sig ... end ``` -Doc of `M''`, part 1\. +Doc of `M''`, part 1. ```ocaml module Alias : T @@ -51,12 +51,12 @@ Doc of `Alias`. ```ocaml class c1 : int -> object ... end ``` -Doc of `c1`, part 1\. +Doc of `c1`, part 1. ```ocaml class type ct = object ... end ``` -Doc of `ct`, part 1\. +Doc of `ct`, part 1. ```ocaml class c2 : ct diff --git a/test/generators/markdown/mld.md b/test/generators/markdown/mld.md index 51c11290ae..bbefbe7f14 100644 --- a/test/generators/markdown/mld.md +++ b/test/generators/markdown/mld.md @@ -17,7 +17,7 @@ Another paragraph in section. This is another section. -Another paragraph in section 2\. +Another paragraph in section 2. ### Subsection @@ -33,6 +33,6 @@ Yet another paragraph in subsection. This is another subsection. -Another paragraph in subsection 2\. +Another paragraph in subsection 2. -Yet another paragraph in subsection 2\. +Yet another paragraph in subsection 2. diff --git a/test/model/semantics/expected/author.expected b/test/model/semantics/expected/author.expected index a122ee6838..ff791c7499 100644 --- a/test/model/semantics/expected/author.expected +++ b/test/model/semantics/expected/author.expected @@ -96,7 +96,7 @@ foo --- input --- foo @author Bar --- output --- -{"value":[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 4-15:\n'@author' should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`Paragraph":[{"`Word":"foo "}]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 4-15:\n'@author' should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- [@author Foo] --- output --- @@ -117,24 +117,24 @@ foo @author Bar --- input --- - foo @author Bar --- output --- -{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Paragraph":[{"`Word":"@author"},"`Space",{"`Word":" Bar"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 6-17:\n'@author' is not allowed in '-' (bulleted list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo "}]},{"`Paragraph":[{"`Word":"@author Bar"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 6-17:\n'@author' is not allowed in '-' (bulleted list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- - @author Foo --- output --- -{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"@author"},"`Space",{"`Word":" Foo"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 2-13:\n'@author' is not allowed in '-' (bulleted list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"@author Foo"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 2-13:\n'@author' is not allowed in '-' (bulleted list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {ul {li foo @author Bar}} --- output --- -{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Paragraph":[{"`Word":"@author"},"`Space",{"`Word":" Bar}}"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 12-25:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 1, characters 25-25:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 1, characters 25-25:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo "}]},{"`Paragraph":[{"`Word":"@author Bar}}"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 12-25:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 1, characters 25-25:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 1, characters 25-25:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {ul {li @author Foo}} --- output --- -{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"@author"},"`Space",{"`Word":" Foo}}"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 8-21:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 1, characters 21-21:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 1, characters 21-21:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"@author Foo}}"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 8-21:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 1, characters 21-21:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 1, characters 21-21:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {ul {li foo @author Bar}} --- output --- -{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]},{"`Paragraph":[{"`Word":"@author"},"`Space",{"`Word":" Bar}}"}]}]]]}],"warnings":["File \"f.ml\", line 2, characters 0-13:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 2, characters 13-13:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 2, characters 13-13:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]},{"`Paragraph":[{"`Word":"@author Bar}}"}]}]]]}],"warnings":["File \"f.ml\", line 2, characters 0-13:\n'@author' is not allowed in '{li ...}' (list item).\nSuggestion: move '@author' outside of any other markup.","File \"f.ml\", line 2, characters 13-13:\nEnd of text is not allowed in '{li ...}' (list item).\nSuggestion: add '}'.","File \"f.ml\", line 2, characters 13-13:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {ul @author Foo} --- output --- diff --git a/test/model/semantics/expected/heading.expected b/test/model/semantics/expected/heading.expected index a5659c0810..2b327e08fe 100644 --- a/test/model/semantics/expected/heading.expected +++ b/test/model/semantics/expected/heading.expected @@ -58,7 +58,7 @@ Foo} } --- output --- -{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-"]},[{"`Word":"Foo"},"`Space"]]}],"warnings":["File \"f.ml\", line 2, characters 0-0:\nBlank line is not allowed in '{2 ...}' (section heading)."]} +{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-"]},[{"`Word":"Foo\n\n"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-0:\nBlank line is not allowed in '{2 ...}' (section heading)."]} --- input --- {2 [foo]} --- output --- @@ -80,11 +80,11 @@ baz]} --- input --- {2 {e foo bar}} --- output --- -{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Styled":["`Emphasis",[{"`Word":"foo"},"`Space",{"`Word":"bar"}]]}]]}],"warnings":[]} +{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Styled":["`Emphasis",[{"`Word":"foo bar"}]]}]]}],"warnings":[]} --- input --- {2 foo bar} --- output --- -{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Word":"foo"},"`Space",{"`Word":"bar"}]]}],"warnings":[]} +{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Word":"foo bar"}]]}],"warnings":[]} --- input --- {2 {2 Foo}} --- output --- @@ -100,7 +100,7 @@ baz]} --- input --- foo {2 Bar} --- output --- -{"value":[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 4-6:\n'{2 ...}' (section heading) should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`Paragraph":[{"`Word":"foo "}]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 4-6:\n'{2 ...}' (section heading) should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {2 Foo} bar @@ -118,11 +118,11 @@ foo --- input --- {2 :foo Bar} --- output --- -{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},":foo-bar"]},[{"`Word":":foo"},"`Space",{"`Word":"Bar"}]]}],"warnings":[]} +{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},":foo-bar"]},[{"`Word":":foo Bar"}]]}],"warnings":[]} --- input --- {2: foo Bar} --- output --- -{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Word":"foo"},"`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-3:\nHeading label should not be empty."]} +{"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar"]},[{"`Word":"foo Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-3:\nHeading label should not be empty."]} --- input --- {2:foo} --- output --- diff --git a/test/model/semantics/expected/simple_reference.expected b/test/model/semantics/expected/simple_reference.expected index 99a6a94844..a779a7f230 100644 --- a/test/model/semantics/expected/simple_reference.expected +++ b/test/model/semantics/expected/simple_reference.expected @@ -17,7 +17,7 @@ bar{!foo} --- input --- bar {!foo} --- output --- -{"value":[{"`Paragraph":[{"`Word":"bar"},"`Space",{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`Paragraph":[{"`Word":"bar "},{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {!foo}bar --- output --- @@ -25,7 +25,7 @@ bar {!foo} --- input --- {!foo} bar --- output --- -{"value":[{"`Paragraph":[{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]},"`Space",{"`Word":"bar"}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} +{"value":[{"`Paragraph":[{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]},{"`Word":" bar"}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} --- input --- {!val:foo} --- output --- diff --git a/test/xref2/canonical_hidden_module.t/run.t b/test/xref2/canonical_hidden_module.t/run.t index 7bfaacc31f..9e4d0f37f9 100644 --- a/test/xref2/canonical_hidden_module.t/run.t +++ b/test/xref2/canonical_hidden_module.t/run.t @@ -157,8 +157,9 @@ See the comments on the types at the end of test.mli for the expectation.
    -

    This should render as A.t but link to A_nonhidden/index.html - - since A has no expansion +

    + This should render as A.t but link to A_nonhidden/index.html - since A + has no expansion

    @@ -168,8 +169,9 @@ See the comments on the types at the end of test.mli for the expectation. type b
    -

    This should have no RHS as it's hidden and there is no canonical - alternative +

    + This should have no RHS as it's hidden and there is no canonical + alternative

    diff --git a/test/xref2/github_issue_342.t/run.t b/test/xref2/github_issue_342.t/run.t index 4e4354d441..37c5e4430f 100644 --- a/test/xref2/github_issue_342.t/run.t +++ b/test/xref2/github_issue_342.t/run.t @@ -31,7 +31,7 @@ The rendered headings with text in title --

    - An - url http://ocaml.org and + An url + http://ocaml.org and with text in a title diff --git a/test/xref2/labels/ambiguous_label.t/run.t b/test/xref2/labels/ambiguous_label.t/run.t index ed422d4a3c..748527e8c3 100644 --- a/test/xref2/labels/ambiguous_label.t/run.t +++ b/test/xref2/labels/ambiguous_label.t/run.t @@ -44,10 +44,10 @@ References should resolve to the first occurence of the ambiguous label. It is not possible to use the internal label name in references: $ odoc_print test.odocl | jq -c '.. | .["`Reference"]? | select(.)' - [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example"]}}},[{"`Word":"Should"},"`Space",{"`Word":"resolve"},"`Space",{"`Word":"to"},"`Space",{"`Word":"the"},"`Space",{"`Word":"first"},"`Space",{"`Word":"label"}]] - [{"`Root":["example_2","`TUnknown"]},[{"`Word":"Shouldn't"},"`Space",{"`Word":"resolve"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example"]}}},[{"`Word":"Should resolve to the first label"}]] + [{"`Root":["example_2","`TUnknown"]},[{"`Word":"Shouldn't resolve"}]] A second module has a reference to the ambiguous label: $ odoc_print test_2.odocl | jq -c '.. | .["`Reference"]? | select(.)' - [{"`Resolved":{"`Label":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]}},"example"]}},[{"`Word":"Should"},"`Space",{"`Word":"resolve"},"`Space",{"`Word":"to"},"`Space",{"`Word":"the"},"`Space",{"`Word":"first"},"`Space",{"`Word":"label"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]}},"example"]}},[{"`Word":"Should resolve to the first label"}]] diff --git a/test/xref2/labels/labels.t/run.t b/test/xref2/labels/labels.t/run.t index 3e18fc534e..ba2a5b9f54 100644 --- a/test/xref2/labels/labels.t/run.t +++ b/test/xref2/labels/labels.t/run.t @@ -27,14 +27,14 @@ References to the labels: We expect resolved references and the heading text filled in. $ odoc_print test.odocl | jq -c '.. | .["`Reference"]? | select(.)' - [{"`Resolved":{"`Identifier":{"`Label":[{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"N"]},"B"]}}},[{"`Word":"An"},"`Space",{"`Word":"other"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},[{"`Word":"Potentially"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]] - [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"A"]}}},[{"`Word":"First"},"`Space",{"`Word":"label"}]] - [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"B"]}}},[{"`Word":"Dupplicate"},"`Space",{"`Word":"B"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"C"]}},[{"`Word":"First"},"`Space",{"`Word":"label"},"`Space",{"`Word":"of"},"`Space",{"`Word":"M"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"D"]}},[{"`Word":"Floating"},"`Space",{"`Word":"label"},"`Space",{"`Word":"in"},"`Space",{"`Word":"M"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},[{"`Word":"Potentially"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"N"]}},"B"]}},[{"`Word":"An"},"`Space",{"`Word":"other"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"N"]},"B"]}}},[{"`Word":"An other conflicting label"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},[{"`Word":"Potentially conflicting label"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"A"]}}},[{"`Word":"First label"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"B"]}}},[{"`Word":"Dupplicate B"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"C"]}},[{"`Word":"First label of M"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"D"]}},[{"`Word":"Floating label in M"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},[{"`Word":"Potentially conflicting label"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"N"]}},"B"]}},[{"`Word":"An other conflicting label"}]] $ odoc html-generate --indent -o html test.odocl diff --git a/test/xref2/labels/shadowed_in_submodules.t/run.t b/test/xref2/labels/shadowed_in_submodules.t/run.t index 3050aeda71..f1663cf2f1 100644 --- a/test/xref2/labels/shadowed_in_submodules.t/run.t +++ b/test/xref2/labels/shadowed_in_submodules.t/run.t @@ -7,6 +7,6 @@ There should be no ambiguous labels in this example. All the references should resolve and point to what's written in the text. $ odoc_print test.odocl | jq -c '.. | .["`Reference"]? | select(.)' - [{"`Resolved":{"`Identifier":{"`Label":[{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X"]},"foo"]}}},[{"`Word":"Expecting"},"`Space",{"`Word":"H2"}]] - [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"foo"]}}},[{"`Word":"Expecting"},"`Space",{"`Word":"H1"}]] - [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X"]}},"foo"]}},[{"`Word":"Expecting"},"`Space",{"`Word":"H2"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X"]},"foo"]}}},[{"`Word":"Expecting H2"}]] + [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"foo"]}}},[{"`Word":"Expecting H1"}]] + [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X"]}},"foo"]}},[{"`Word":"Expecting H2"}]] diff --git a/test/xref2/module_list.t/run.t b/test/xref2/module_list.t/run.t index 91966549fc..c00d8e6070 100644 --- a/test/xref2/module_list.t/run.t +++ b/test/xref2/module_list.t/run.t @@ -16,37 +16,37 @@ Everything should resolve: $ odoc_print main.odocl | jq -c '.. | .["`Modules"]? | select(.) | .[] | .[]' {"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"External"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"External"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"External"},{"`Word":"."}]} {"`Resolved":{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"External"]}},"X"]}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"X"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"X"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}}} "None" {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"Internal"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"Internal"},{"`Word":"."}]} {"`Resolved":{"`Module":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}},"Y"]}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Word":"Internal."},{"`Code_span":"X"},{"`Word":"."},"`Space",{"`Word":"An"},"`Space",{"`Word":"other"},"`Space",{"`Word":"sentence."}]} + {"Some":[{"`Word":"Doc for Internal."},{"`Code_span":"X"},{"`Word":". An other sentence."}]} {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Z"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"Z"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"Z"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"F"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"F ()"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"F ()"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Type_of"]}}} "None" {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Type_of_str"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"of"},"`Space",{"`Code_span":"Type_of_str"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc of "},{"`Code_span":"Type_of_str"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"With_type"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"T"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"T"},{"`Word":"."}]} {"`Resolved":{"`Alias":[{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"External"]}},"X"]},{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Alias"]}}]}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"X"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"X"},{"`Word":"."}]} {"`Resolved":{"`Alias":[{"`Canonical":[{"`Module":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}},"C1"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"C1"]}}}]},{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"C1"]}}]}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"C1"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"C1"},{"`Word":"."}]} {"`Resolved":{"`Alias":[{"`Canonical":[{"`Module":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}},"C2"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"C2"]}}}]},{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"C2"]}}]}} "None" {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Inline_include"]}}} - {"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"T"},{"`Word":"."}]} + {"Some":[{"`Word":"Doc for "},{"`Code_span":"T"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Starts_with_open"]}}} - {"Some":[{"`Word":"Synopsis"},"`Space",{"`Word":"of"},"`Space",{"`Code_span":"Starts_with_open"},{"`Word":"."}]} + {"Some":[{"`Word":"Synopsis of "},{"`Code_span":"Starts_with_open"},{"`Word":"."}]} {"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Resolve_synopsis"]}}} - {"Some":[{"`Word":"This"},"`Space",{"`Word":"should"},"`Space",{"`Word":"be"},"`Space",{"`Word":"resolved"},"`Space",{"`Word":"when"},"`Space",{"`Word":"included:"},"`Space",{"`Reference":[{"`Resolved":{"`Type":[{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}},"Resolve_synopsis"]},"t"]}},[]]},{"`Word":"."},"`Space",{"`Word":"These"},"`Space",{"`Word":"shouldn't:"},"`Space",{"`Reference":[{"`Root":["t","`TUnknown"]},[]]},"`Space",{"`Reference":[{"`Dot":[{"`Root":["Resolve_synopsis","`TUnknown"]},"t"]},[]]}]} + {"Some":[{"`Word":"This should be resolved when included: "},{"`Reference":[{"`Resolved":{"`Type":[{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}},"Resolve_synopsis"]},"t"]}},[]]},{"`Word":". These\n shouldn't: "},{"`Reference":[{"`Root":["t","`TUnknown"]},[]]},{"`Space":" "},{"`Reference":[{"`Dot":[{"`Root":["Resolve_synopsis","`TUnknown"]},"t"]},[]]}]} {"`Resolved":{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"External"]}},"Resolve_synopsis"]}} {"Some":[{"`Reference":[{"`Root":["t","`TUnknown"]},[]]}]} @@ -55,6 +55,6 @@ References in the synopses above should be resolved. $ odoc_print external.odocl | jq -c '.. | .["`Modules"]? | select(.) | .[] | .[]' {"`Resolved":{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}},"Resolve_synopsis"]}} - {"Some":[{"`Word":"This"},"`Space",{"`Word":"should"},"`Space",{"`Word":"be"},"`Space",{"`Word":"resolved"},"`Space",{"`Word":"when"},"`Space",{"`Word":"included:"},"`Space",{"`Reference":[{"`Resolved":{"`Type":[{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}},"Resolve_synopsis"]},"t"]}},[]]},{"`Word":"."},"`Space",{"`Word":"These"},"`Space",{"`Word":"shouldn't:"},"`Space",{"`Reference":[{"`Root":["t","`TUnknown"]},[]]},"`Space",{"`Reference":[{"`Dot":[{"`Root":["Resolve_synopsis","`TUnknown"]},"t"]},[]]}]} + {"Some":[{"`Word":"This should be resolved when included: "},{"`Reference":[{"`Resolved":{"`Type":[{"`Module":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]}},"Resolve_synopsis"]},"t"]}},[]]},{"`Word":". These\n shouldn't: "},{"`Reference":[{"`Root":["t","`TUnknown"]},[]]},{"`Space":" "},{"`Reference":[{"`Dot":[{"`Root":["Resolve_synopsis","`TUnknown"]},"t"]},[]]}]} 'Type_of' and 'Alias' don't have a summary. `C1` and `C2` neither, we expect at least `C2` to have one. diff --git a/test/xref2/module_preamble.t/run.t b/test/xref2/module_preamble.t/run.t index 89f907e601..8b63e179d8 100644 --- a/test/xref2/module_preamble.t/run.t +++ b/test/xref2/module_preamble.t/run.t @@ -95,8 +95,9 @@ and that "hidden" modules (eg. `A__b`, rendered to `html/A__b`) are not rendered

    An heading

    -

    This paragraph is not part of the preamble. It'll be rendered in - the "content". +

    + This paragraph is not part of the preamble. It'll be rendered in the + "content".

    diff --git a/test/xref2/module_type_alias.t/run.t b/test/xref2/module_type_alias.t/run.t index a67982167d..69588121cf 100644 --- a/test/xref2/module_type_alias.t/run.t +++ b/test/xref2/module_type_alias.t/run.t @@ -64,7 +64,9 @@ as they are both referencing items that won't be expanded. [] ] }, - "`Space", + { + "`Space": " " + }, { "`Reference": [ { diff --git a/test/xref2/path_references.t/run.t b/test/xref2/path_references.t/run.t index 1efc9623e4..79a1f92f96 100644 --- a/test/xref2/path_references.t/run.t +++ b/test/xref2/path_references.t/run.t @@ -33,27 +33,27 @@ Helper that extracts references in a compact way. Headings help to interpret the $ jq_references() { jq -c '.. | objects | if has("`Reference") then . elif has("`Heading") then [ .. | .["`Word"]? | select(.) ] else empty end'; } $ odoc_print ./h/pkg/page-foo.odocl | jq_references - ["Title","for","foo"] - ["Page","foo"] + ["Title for foo"] + ["Page foo"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} - ["Page","subdir/bar"] + ["Page subdir/bar"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Root":["bar","`TUnknown"]},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} - ["Page","dup"] + ["Page dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} - ["Page","subdir/dup"] + ["Page subdir/dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} - ["Module","Test"] + ["Module Test"] {"`Reference":[{"`Any_path":["`TCurrentPackage",["Test"]]},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"libname"]}},"Test"]}}},[]]} {"`Reference":[{"`Any_path":["`TRelativePath",["Test"]]},[]]} @@ -64,48 +64,48 @@ Helper that extracts references in a compact way. Headings help to interpret the {"`Reference":[{"`Resolved":{"`Identifier":{"`AssetFile":[{"`Page":["None","pkg"]},"img.png"]}}},[]]} $ odoc_print ./h/pkg/subdir/page-bar.odocl | jq_references - ["Title","for","subdir/bar"] - ["Page","foo"] + ["Title for subdir/bar"] + ["Page foo"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} - ["Page","subdir/bar"] + ["Page subdir/bar"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} - ["Page","dup"] + ["Page dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} - ["Page","subdir/dup"] + ["Page subdir/dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} - ["Module","Test"] + ["Module Test"] {"`Reference":[{"`Any_path":["`TCurrentPackage",["libname","Test"]]},[]]} {"`Reference":[{"`Any_path":["`TAbsolutePath",["pkg","libname","Test"]]},[]]} {"`Reference":[{"`Any_path":["`TRelativePath",["Test"]]},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"libname"]}},"Test"]}}},[]]} $ odoc_print ./h/pkg/libname/test.odocl | jq_references - ["Page","foo"] + ["Page foo"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"foo"]}}},[]]} - ["Page","subdir/bar"] + ["Page subdir/bar"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"bar"]}}},[]]} {"`Reference":[{"`Root":["bar","`TUnknown"]},[]]} - ["Page","dup"] + ["Page dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":["None","pkg"]}},"dup"]}}},[]]} - ["Page","subdir/dup"] + ["Page subdir/dup"] {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`LeafPage":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"subdir"]}},"dup"]}}},[]]} - ["Module","Test"] + ["Module Test"] {"`Reference":[{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"libname"]}},"Test"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"libname"]}},"Test"]}}},[]]} {"`Reference":[{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":[{"Some":{"`Page":["None","pkg"]}},"libname"]}},"Test"]}}},[]]}