Organisationsocamlodoc405b59 ()macos-homebrew-4.14_opam-2.3

macos-homebrew-4.14_opam-2.3

Link Copied
Code Copied

Logs

2025-01-23 10:51.16: New job: test ocaml/odoc https://github.com/ocaml/odoc.git#refs/heads/v3.0 (405b59e61e7352f54e1973a4557849d58dcf9b5d) (macos-x86_64:macos-homebrew-4.14_opam-2.3)
Base: macos-homebrew-ocaml-4.14
Opam project build


To reproduce locally:


git clone --recursive "https://github.com/ocaml/odoc.git" -b "v3.0" && cd "odoc" && git reset --hard 405b59e6
cat > Dockerfile <<'END-OF-DOCKERFILE'
FROM macos-homebrew-ocaml-4.14
# macos-homebrew-4.14_opam-2.3
USER 1000:1000
ENV CLICOLOR_FORCE="1"
ENV OPAMCOLOR="always"
RUN ln -f ~/local/bin/opam-2.3 ~/local/bin/opam
RUN opam init --reinit -ni
RUN uname -rs && opam exec -- ocaml -version && opam --version
RUN cd ~/opam-repository && (git cat-file -e b41fc63234d56d04112634b1ea9121f12caf9794 || git fetch origin master) && git reset -q --hard b41fc63234d56d04112634b1ea9121f12caf9794 && git log --no-decorate -n1 --oneline && opam update -u
COPY --chown=1000:1000 sherlodoc.opam odoc.opam odoc-parser.opam odoc-md.opam odoc-driver.opam odoc-bench.opam ./src/./
RUN opam pin add -yn sherlodoc.dev './src/./' && \
opam pin add -yn odoc.dev './src/./' && \
opam pin add -yn odoc-parser.dev './src/./' && \
opam pin add -yn odoc-md.dev './src/./' && \
opam pin add -yn odoc-driver.dev './src/./' && \
opam pin add -yn odoc-bench.dev './src/./'
RUN echo '(lang dune 3.0)' > './src/./dune-project'
ENV DEPS="alcotest.1.8.0 astring.0.8.5 b0.0.0.5 base.v0.16.3 base-bigarray.base base-bytes.base base-threads.base base-unix.base base64.3.5.1 base_bigstring.v0.16.0 base_quickcheck.v0.16.0 bigstringaf.0.10.0 bin_prot.v0.16.0 bisect_ppx.2.8.3 bos.0.2.1 brr.0.0.7 camlp-streams.5.0.1 checkseum.0.5.2 cmarkit.0.3.0 cmdliner.1.3.0 conf-bash.1 conf-jq.1 core.v0.16.2 core_kernel.v0.16.0 cppo.1.8.0 crunch.3.3.1 csexp.1.5.2 decompress.1.5.3 dune.3.17.1 dune-configurator.3.17.1 fieldslib.v0.16.0 fmt.0.9.0 fpath.0.7.3 gen.1.1 int_repr.v0.16.0 jane-street-headers.v0.16.0 js_of_ocaml.5.9.1 js_of_ocaml-compiler.5.9.1 js_of_ocaml-toplevel.5.9.1 jst-config.v0.16.0 logs.0.7.0 lwt.5.9.0 mdx.2.5.0 menhir.20240715 menhirCST.20240715 menhirLib.20240715 menhirSdk.20240715 num.1.5-1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.3.7.3 ocamlbuild.0.15.0 ocamlfind.1.9.6 ocplib-endian.1.2 odig.0.0.9 optint.0.3.0 parsexp.v0.16.0 ppx_assert.v0.16.0 ppx_base.v0.16.0 ppx_bench.v0.16.0 ppx_bin_prot.v0.16.0 ppx_blob.0.9.0 ppx_cold.v0.16.0 ppx_compare.v0.16.0 ppx_custom_printf.v0.16.0 ppx_derivers.1.2.1 ppx_disable_unused_warnings.v0.16.0 ppx_enumerate.v0.16.0 ppx_expect.v0.16.1 ppx_fields_conv.v0.16.0 ppx_fixed_literal.v0.16.0 ppx_globalize.v0.16.0 ppx_hash.v0.16.0 ppx_here.v0.16.0 ppx_ignore_instrumentation.v0.16.0 ppx_inline_test.v0.16.1 ppx_jane.v0.16.0 ppx_let.v0.16.0 ppx_log.v0.16.0 ppx_module_timer.v0.16.0 ppx_optcomp.v0.16.0 ppx_optional.v0.16.0 ppx_pipebang.v0.16.0 ppx_sexp_conv.v0.16.0 ppx_sexp_message.v0.16.0 ppx_sexp_value.v0.16.0 ppx_stable.v0.16.0 ppx_stable_witness.v0.16.0 ppx_string.v0.16.0 ppx_tydi.v0.16.0 ppx_typerep_conv.v0.16.0 ppx_variants_conv.v0.16.0 ppxlib.0.34.0 ptime.1.2.0 re.1.12.0 result.1.5 rresult.0.7.0 sedlex.3.3 seq.base sexplib.v0.16.0 sexplib0.v0.16.0 splittable_random.v0.16.0 stdio.v0.16.0 stdlib-shims.0.3.0 time_now.v0.16.0 topkg.1.0.7 typerep.v0.16.0 tyxml.4.6.0 uutf.1.0.3 variantslib.v0.16.0 yojson.2.2.2"
ENV CI="true"
ENV OCAMLCI="true"
RUN opam update --depexts && opam install --cli=2.3 --depext-only -y sherlodoc.dev odoc.dev odoc-parser.dev odoc-md.dev odoc-bench.dev $DEPS
RUN opam install $DEPS
COPY --chown=1000:1000 . ./src
RUN cd ./src && opam exec -- dune build --only-packages=sherlodoc,odoc,odoc-parser,odoc-md,odoc-bench @install @check @runtest && rm -rf _build


END-OF-DOCKERFILE
docker build .
END-REPRO-BLOCK


2025-01-23 10:51.16: Using cache hint "ocaml/odoc-macos-homebrew-ocaml-4.14-macos-homebrew-4.14_opam-2.3-b424b1a63cda657e90c89c75689203f9"
2025-01-23 10:51.16: Using OBuilder spec:
((from macos-homebrew-ocaml-4.14)
(comment macos-homebrew-4.14_opam-2.3)
(user (uid 1000) (gid 1000))
(env CLICOLOR_FORCE 1)
(env OPAMCOLOR always)
(run (shell "ln -f ~/local/bin/opam-2.3 ~/local/bin/opam"))
(run (shell "opam init --reinit -ni"))
(run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
(run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e b41fc63234d56d04112634b1ea9121f12caf9794 || git fetch origin master) && git reset -q --hard b41fc63234d56d04112634b1ea9121f12caf9794 && git log --no-decorate -n1 --oneline && opam update -u"))
(copy (src sherlodoc.opam odoc.opam odoc-parser.opam odoc-md.opam odoc-driver.opam odoc-bench.opam)
(dst ./src/./))
(run (network host)
(shell  "opam pin add -yn sherlodoc.dev './src/./' && \
\nopam pin add -yn odoc.dev './src/./' && \
\nopam pin add -yn odoc-parser.dev './src/./' && \
\nopam pin add -yn odoc-md.dev './src/./' && \
\nopam pin add -yn odoc-driver.dev './src/./' && \
\nopam pin add -yn odoc-bench.dev './src/./'"))
(run (network host)
(shell "echo '(lang dune 3.0)' > './src/./dune-project'"))
(env DEPS "alcotest.1.8.0 astring.0.8.5 b0.0.0.5 base.v0.16.3 base-bigarray.base base-bytes.base base-threads.base base-unix.base base64.3.5.1 base_bigstring.v0.16.0 base_quickcheck.v0.16.0 bigstringaf.0.10.0 bin_prot.v0.16.0 bisect_ppx.2.8.3 bos.0.2.1 brr.0.0.7 camlp-streams.5.0.1 checkseum.0.5.2 cmarkit.0.3.0 cmdliner.1.3.0 conf-bash.1 conf-jq.1 core.v0.16.2 core_kernel.v0.16.0 cppo.1.8.0 crunch.3.3.1 csexp.1.5.2 decompress.1.5.3 dune.3.17.1 dune-configurator.3.17.1 fieldslib.v0.16.0 fmt.0.9.0 fpath.0.7.3 gen.1.1 int_repr.v0.16.0 jane-street-headers.v0.16.0 js_of_ocaml.5.9.1 js_of_ocaml-compiler.5.9.1 js_of_ocaml-toplevel.5.9.1 jst-config.v0.16.0 logs.0.7.0 lwt.5.9.0 mdx.2.5.0 menhir.20240715 menhirCST.20240715 menhirLib.20240715 menhirSdk.20240715 num.1.5-1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.3.7.3 ocamlbuild.0.15.0 ocamlfind.1.9.6 ocplib-endian.1.2 odig.0.0.9 optint.0.3.0 parsexp.v0.16.0 ppx_assert.v0.16.0 ppx_base.v0.16.0 ppx_bench.v0.16.0 ppx_bin_prot.v0.16.0 ppx_blob.0.9.0 ppx_cold.v0.16.0 ppx_compare.v0.16.0 ppx_custom_printf.v0.16.0 ppx_derivers.1.2.1 ppx_disable_unused_warnings.v0.16.0 ppx_enumerate.v0.16.0 ppx_expect.v0.16.1 ppx_fields_conv.v0.16.0 ppx_fixed_literal.v0.16.0 ppx_globalize.v0.16.0 ppx_hash.v0.16.0 ppx_here.v0.16.0 ppx_ignore_instrumentation.v0.16.0 ppx_inline_test.v0.16.1 ppx_jane.v0.16.0 ppx_let.v0.16.0 ppx_log.v0.16.0 ppx_module_timer.v0.16.0 ppx_optcomp.v0.16.0 ppx_optional.v0.16.0 ppx_pipebang.v0.16.0 ppx_sexp_conv.v0.16.0 ppx_sexp_message.v0.16.0 ppx_sexp_value.v0.16.0 ppx_stable.v0.16.0 ppx_stable_witness.v0.16.0 ppx_string.v0.16.0 ppx_tydi.v0.16.0 ppx_typerep_conv.v0.16.0 ppx_variants_conv.v0.16.0 ppxlib.0.34.0 ptime.1.2.0 re.1.12.0 result.1.5 rresult.0.7.0 sedlex.3.3 seq.base sexplib.v0.16.0 sexplib0.v0.16.0 splittable_random.v0.16.0 stdio.v0.16.0 stdlib-shims.0.3.0 time_now.v0.16.0 topkg.1.0.7 typerep.v0.16.0 tyxml.4.6.0 uutf.1.0.3 variantslib.v0.16.0 yojson.2.2.2")
(env CI true)
(env OCAMLCI true)
(run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "opam update --depexts && opam install --cli=2.3 --depext-only -y sherlodoc.dev odoc.dev odoc-parser.dev odoc-md.dev odoc-bench.dev $DEPS"))
(run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "opam install $DEPS"))
(copy (src .) (dst ./src))
(run (shell "cd ./src && opam exec -- dune build --only-packages=sherlodoc,odoc,odoc-parser,odoc-md,odoc-bench @install @check @runtest && rm -rf _build"))
)


2025-01-23 10:51.16: Waiting for resource in pool OCluster
2025-01-23 10:51.16: Waiting for worker…
2025-01-23 10:51.16: Got resource from pool OCluster
Building on i7-worker-02
HEAD is now at e9ede9543 Fixes following review
HEAD is now at 405b59e61 Note about emulating context


(from macos-homebrew-ocaml-4.14)
2025-01-23 10:51.19 ---> using "0c60f117aee57abea8364cb033d47bb1d63ff0f68e5ee97378e032498e8442af" from cache


/: (comment macos-homebrew-4.14_opam-2.3)


/: (user (uid 1000) (gid 1000))


/: (env CLICOLOR_FORCE 1)


/: (env OPAMCOLOR always)


/: (run (shell "ln -f ~/local/bin/opam-2.3 ~/local/bin/opam"))
2025-01-23 10:51.19 ---> using "d185bb362ab7a62e22c76fe28c4578fe7a4e17f7cc7bc09a3073972dfb5efd3b" from cache


/: (run (shell "opam init --reinit -ni"))
No configuration file found, using built-in defaults.
Checking for available remotes: rsync and local, git.
- you won't be able to use mercurial repositories unless you install the hg command on your system.
- you won't be able to use darcs repositories unless you install the darcs command on your system.


This version of opam requires an update to the layout of /Users/mac1000/.opam from version 2.1 to version 2.2, which can't be reverted.
You may want to back it up before going further.


Continue? [y/n] y
[NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using:
opam option jobs=1 --global
Format upgrade done.


<><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><>
[default] no changes from git+file:///Users/mac1000/opam-repository
2025-01-23 10:51.20 ---> using "1a239dab0512a5f76e4948de67b26faca67b4de935df003aa7f81d4e2d68958d" from cache


/: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version"))
Darwin 23.4.0
The OCaml toplevel, version 4.14.2
2.3.0
2025-01-23 10:51.20 ---> using "f52eecff7be584d99550d2f8c42b8f22f9135c2276c46c827a485f089226c5ac" from cache


/: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "cd ~/opam-repository && (git cat-file -e b41fc63234d56d04112634b1ea9121f12caf9794 || git fetch origin master) && git reset -q --hard b41fc63234d56d04112634b1ea9121f12caf9794 && git log --no-decorate -n1 --oneline && opam update -u"))
From https://github.com/ocaml/opam-repository
* branch                  master     -> FETCH_HEAD
67e940587b..b41fc63234  master     -> origin/master
b41fc63234 Merge pull request #27302 from ocaml/dra27--rm-non-win32-host-pkgs


<><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><>
[default] synchronised from git+file:///Users/mac1000/opam-repository


Everything as up-to-date as possible (run with --verbose to show unavailable upgrades).


The following packages are not being upgraded because the new versions conflict with other installed packages:
- ocaml.5.4.0
- ocaml-config.3
However, you may "opam upgrade" these packages explicitly, which will ask permission to downgrade or uninstall the conflicting packages.
Nothing to do.
# To update the current shell environment, run: eval $(opam env)
2025-01-23 10:51.20 ---> using "1237bea9c3d78c74a59942d61601de9878aaaa6722605181a8756269628b0d5b" from cache


/: (copy (src sherlodoc.opam odoc.opam odoc-parser.opam odoc-md.opam odoc-driver.opam odoc-bench.opam)
(dst ./src/./))
2025-01-23 10:51.21 ---> using "8820adb0669e35a2ff8dc7b13f482dfc27c82a8bf498c58931acf2f20b198ba3" from cache


/: (run (network host)
(shell  "opam pin add -yn sherlodoc.dev './src/./' && \
\nopam pin add -yn odoc.dev './src/./' && \
\nopam pin add -yn odoc-parser.dev './src/./' && \
\nopam pin add -yn odoc-md.dev './src/./' && \
\nopam pin add -yn odoc-driver.dev './src/./' && \
\nopam pin add -yn odoc-bench.dev './src/./'"))
[sherlodoc.dev] synchronised (file:///Users/mac1000/src)
sherlodoc is now pinned to file:///Users/mac1000/src (version dev)
[odoc.dev] synchronised (file:///Users/mac1000/src)
odoc is now pinned to file:///Users/mac1000/src (version dev)
[odoc-parser.dev] synchronised (file:///Users/mac1000/src)
odoc-parser is now pinned to file:///Users/mac1000/src (version dev)
Package odoc-md does not exist, create as a NEW package? [y/n] y
[odoc-md.dev] synchronised (file:///Users/mac1000/src)
odoc-md is now pinned to file:///Users/mac1000/src (version dev)
Package odoc-driver does not exist, create as a NEW package? [y/n] y
[odoc-driver.dev] synchronised (file:///Users/mac1000/src)
odoc-driver is now pinned to file:///Users/mac1000/src (version dev)
Package odoc-bench does not exist, create as a NEW package? [y/n] y
[odoc-bench.dev] synchronised (file:///Users/mac1000/src)
[WARNING] Failed checks on odoc-bench package definition from source at file:///Users/mac1000/src:
warning 47: Synopsis should start with a capital and not end with a dot
odoc-bench is now pinned to file:///Users/mac1000/src (version dev)
2025-01-23 10:51.21 ---> using "33bee4cc862a8d00184bb6799c6a97751115ae4d34b55b2304d1043ee1845d3a" from cache


/: (run (network host)
(shell "echo '(lang dune 3.0)' > './src/./dune-project'"))
2025-01-23 10:51.22 ---> using "955c7e1f81fa20ca3f0fc0eee41fa1f189ab6cd10155214588f3216c99aca63a" from cache


/: (env DEPS "alcotest.1.8.0 astring.0.8.5 b0.0.0.5 base.v0.16.3 base-bigarray.base base-bytes.base base-threads.base base-unix.base base64.3.5.1 base_bigstring.v0.16.0 base_quickcheck.v0.16.0 bigstringaf.0.10.0 bin_prot.v0.16.0 bisect_ppx.2.8.3 bos.0.2.1 brr.0.0.7 camlp-streams.5.0.1 checkseum.0.5.2 cmarkit.0.3.0 cmdliner.1.3.0 conf-bash.1 conf-jq.1 core.v0.16.2 core_kernel.v0.16.0 cppo.1.8.0 crunch.3.3.1 csexp.1.5.2 decompress.1.5.3 dune.3.17.1 dune-configurator.3.17.1 fieldslib.v0.16.0 fmt.0.9.0 fpath.0.7.3 gen.1.1 int_repr.v0.16.0 jane-street-headers.v0.16.0 js_of_ocaml.5.9.1 js_of_ocaml-compiler.5.9.1 js_of_ocaml-toplevel.5.9.1 jst-config.v0.16.0 logs.0.7.0 lwt.5.9.0 mdx.2.5.0 menhir.20240715 menhirCST.20240715 menhirLib.20240715 menhirSdk.20240715 num.1.5-1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocaml-syntax-shims.1.0.0 ocaml-version.3.7.3 ocamlbuild.0.15.0 ocamlfind.1.9.6 ocplib-endian.1.2 odig.0.0.9 optint.0.3.0 parsexp.v0.16.0 ppx_assert.v0.16.0 ppx_base.v0.16.0 ppx_bench.v0.16.0 ppx_bin_prot.v0.16.0 ppx_blob.0.9.0 ppx_cold.v0.16.0 ppx_compare.v0.16.0 ppx_custom_printf.v0.16.0 ppx_derivers.1.2.1 ppx_disable_unused_warnings.v0.16.0 ppx_enumerate.v0.16.0 ppx_expect.v0.16.1 ppx_fields_conv.v0.16.0 ppx_fixed_literal.v0.16.0 ppx_globalize.v0.16.0 ppx_hash.v0.16.0 ppx_here.v0.16.0 ppx_ignore_instrumentation.v0.16.0 ppx_inline_test.v0.16.1 ppx_jane.v0.16.0 ppx_let.v0.16.0 ppx_log.v0.16.0 ppx_module_timer.v0.16.0 ppx_optcomp.v0.16.0 ppx_optional.v0.16.0 ppx_pipebang.v0.16.0 ppx_sexp_conv.v0.16.0 ppx_sexp_message.v0.16.0 ppx_sexp_value.v0.16.0 ppx_stable.v0.16.0 ppx_stable_witness.v0.16.0 ppx_string.v0.16.0 ppx_tydi.v0.16.0 ppx_typerep_conv.v0.16.0 ppx_variants_conv.v0.16.0 ppxlib.0.34.0 ptime.1.2.0 re.1.12.0 result.1.5 rresult.0.7.0 sedlex.3.3 seq.base sexplib.v0.16.0 sexplib0.v0.16.0 splittable_random.v0.16.0 stdio.v0.16.0 stdlib-shims.0.3.0 time_now.v0.16.0 topkg.1.0.7 typerep.v0.16.0 tyxml.4.6.0 uutf.1.0.3 variantslib.v0.16.0 yojson.2.2.2")


/: (env CI true)


/: (env OCAMLCI true)


/: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "opam update --depexts && opam install --cli=2.3 --depext-only -y sherlodoc.dev odoc.dev odoc-parser.dev odoc-md.dev odoc-bench.dev $DEPS"))
+ /usr/local/bin/brew "update"
- ==> Updating Homebrew...
- Already up-to-date.


<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><>
[odoc.dev] synchronised (file:///Users/mac1000/src)
[odoc-bench.dev] synchronised (file:///Users/mac1000/src)
[odoc-md.dev] synchronised (file:///Users/mac1000/src)
[odoc-parser.dev] synchronised (file:///Users/mac1000/src)
[sherlodoc.dev] synchronised (file:///Users/mac1000/src)


[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2).
[NOTE] Package ocaml is already installed (current version is 4.14.2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).


The following system packages will first need to be installed:
jq


<><> Handling external dependencies <><><><><><><><><><><><><><><><><><><><><><>


+ /usr/local/bin/brew "install" "jq"
- ==> Downloading https://ghcr.io/v2/homebrew/core/jq/manifests/1.7.1-1
- Already downloaded: /Users/mac1000/Library/Caches/Homebrew/downloads/d1382cba30f89ffc26790240df7dc444b078442920626f7580500bc63ad0f414--jq-1.7.1-1.bottle_manifest.json
- ==> Fetching dependencies for jq: oniguruma
- ==> Downloading https://ghcr.io/v2/homebrew/core/oniguruma/manifests/6.9.10
- Already downloaded: /Users/mac1000/Library/Caches/Homebrew/downloads/04e9c35970e8b4c6db751bdaa577e7185a85d364ccc66e079983f524aab95a85--oniguruma-6.9.10.bottle_manifest.json
- ==> Fetching oniguruma
- ==> Downloading https://ghcr.io/v2/homebrew/core/oniguruma/blobs/sha256:174fa500f45c9421915e22c34f51abc2849cbce2c05b64f013e4949bf2edd7e0
- Already downloaded: /Users/mac1000/Library/Caches/Homebrew/downloads/55f4f6d4b7a21efea3f9eaf1d09de79033554bc6e76863952124248fab25c1f2--oniguruma--6.9.10.sonoma.bottle.tar.gz
- ==> Fetching jq
- ==> Downloading https://ghcr.io/v2/homebrew/core/jq/blobs/sha256:6bc01de99fd7f091b86880534842132a876f2d3043e3932ea75efc5f51c40aea
- Already downloaded: /Users/mac1000/Library/Caches/Homebrew/downloads/b82b4177f314e88fc5a4088fb5f97e0557219f022b9a684c37ce12a18854864b--jq--1.7.1.sonoma.bottle.1.tar.gz
- ==> Installing dependencies for jq: oniguruma
- ==> Installing jq dependency: oniguruma
- ==> Downloading https://ghcr.io/v2/homebrew/core/oniguruma/manifests/6.9.10
- Already downloaded: /Users/mac1000/Library/Caches/Homebrew/downloads/04e9c35970e8b4c6db751bdaa577e7185a85d364ccc66e079983f524aab95a85--oniguruma-6.9.10.bottle_manifest.json
- ==> Pouring oniguruma--6.9.10.sonoma.bottle.tar.gz
- 🍺  /usr/local/Cellar/oniguruma/6.9.10: 15 files, 1.4MB
- ==> Installing jq
- ==> Pouring jq--1.7.1.sonoma.bottle.1.tar.gz
- 🍺  /usr/local/Cellar/jq/1.7.1: 20 files, 1.3MB
- ==> Running `brew cleanup jq`...
- Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
- Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
2025-01-23 10:51.22 ---> using "7289cea86583e5da1529d8d2d5bcae910e80af42720abdf98a65733c5c11a29f" from cache


/: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew)))
(network host)
(shell "opam install $DEPS"))
[NOTE] Package ocaml-options-vanilla is already installed (current version is 1).
[NOTE] Package ocaml-config is already installed (current version is 2).
[NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2).
[NOTE] Package ocaml is already installed (current version is 4.14.2).
[NOTE] Package base-unix is already installed (current version is base).
[NOTE] Package base-threads is already installed (current version is base).
[NOTE] Package base-bigarray is already installed (current version is base).
The following actions will be performed:
=== install 110 packages
- install alcotest                    1.8.0
- install astring                     0.8.5
- install b0                          0.0.5
- install base                        v0.16.3
- install base-bytes                  base
- install base64                      3.5.1
- install base_bigstring              v0.16.0
- install base_quickcheck             v0.16.0
- install bigstringaf                 0.10.0
- install bin_prot                    v0.16.0
- install bisect_ppx                  2.8.3
- install bos                         0.2.1
- install brr                         0.0.7
- install camlp-streams               5.0.1
- install checkseum                   0.5.2
- install cmarkit                     0.3.0
- install cmdliner                    1.3.0
- install conf-bash                   1
- install conf-jq                     1
- install core                        v0.16.2
- install core_kernel                 v0.16.0
- install cppo                        1.8.0
- install crunch                      3.3.1
- install csexp                       1.5.2
- install decompress                  1.5.3
- install dune                        3.17.1
- install dune-configurator           3.17.1
- install fieldslib                   v0.16.0
- install fmt                         0.9.0
- install fpath                       0.7.3
- install gen                         1.1
- install int_repr                    v0.16.0
- install jane-street-headers         v0.16.0
- install js_of_ocaml                 5.9.1
- install js_of_ocaml-compiler        5.9.1
- install js_of_ocaml-toplevel        5.9.1
- install jst-config                  v0.16.0
- install logs                        0.7.0
- install lwt                         5.9.0
- install mdx                         2.5.0
- install menhir                      20240715
- install menhirCST                   20240715
- install menhirLib                   20240715
- install menhirSdk                   20240715
- install num                         1.5-1
- install ocaml-compiler-libs         v0.12.4
- install ocaml-syntax-shims          1.0.0
- install ocaml-version               3.7.3
- install ocamlbuild                  0.15.0
- install ocamlfind                   1.9.6
- install ocplib-endian               1.2
- install odig                        0.0.9
- install odoc                        dev (pinned) [required by odig]
- install odoc-parser                 dev (pinned) [required by odoc]
- install optint                      0.3.0
- install parsexp                     v0.16.0
- install ppx_assert                  v0.16.0
- install ppx_base                    v0.16.0
- install ppx_bench                   v0.16.0
- install ppx_bin_prot                v0.16.0
- install ppx_blob                    0.9.0
- install ppx_cold                    v0.16.0
- install ppx_compare                 v0.16.0
- install ppx_custom_printf           v0.16.0
- install ppx_derivers                1.2.1
- install ppx_disable_unused_warnings v0.16.0
- install ppx_enumerate               v0.16.0
- install ppx_expect                  v0.16.1
- install ppx_fields_conv             v0.16.0
- install ppx_fixed_literal           v0.16.0
- install ppx_globalize               v0.16.0
- install ppx_hash                    v0.16.0
- install ppx_here                    v0.16.0
- install ppx_ignore_instrumentation  v0.16.0
- install ppx_inline_test             v0.16.1
- install ppx_jane                    v0.16.0
- install ppx_let                     v0.16.0
- install ppx_log                     v0.16.0
- install ppx_module_timer            v0.16.0
- install ppx_optcomp                 v0.16.0
- install ppx_optional                v0.16.0
- install ppx_pipebang                v0.16.0
- install ppx_sexp_conv               v0.16.0
- install ppx_sexp_message            v0.16.0
- install ppx_sexp_value              v0.16.0
- install ppx_stable                  v0.16.0
- install ppx_stable_witness          v0.16.0
- install ppx_string                  v0.16.0
- install ppx_tydi                    v0.16.0
- install ppx_typerep_conv            v0.16.0
- install ppx_variants_conv           v0.16.0
- install ppxlib                      0.34.0
- install ptime                       1.2.0
- install re                          1.12.0
- install result                      1.5
- install rresult                     0.7.0
- install sedlex                      3.3
- install seq                         base
- install sexplib                     v0.16.0
- install sexplib0                    v0.16.0
- install splittable_random           v0.16.0
- install stdio                       v0.16.0
- install stdlib-shims                0.3.0
- install time_now                    v0.16.0
- install topkg                       1.0.7
- install typerep                     v0.16.0
- install tyxml                       4.6.0
- install uutf                        1.0.3
- install variantslib                 v0.16.0
- install yojson                      2.2.2


<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
-> retrieved astring.0.8.5  (cached)
-> retrieved alcotest.1.8.0  (cached)
-> retrieved base.v0.16.3  (cached)
-> retrieved base64.3.5.1  (cached)
-> retrieved base_bigstring.v0.16.0  (cached)
-> retrieved b0.0.0.5  (cached)
-> retrieved bigstringaf.0.10.0  (cached)
-> retrieved base_quickcheck.v0.16.0  (cached)
-> retrieved bin_prot.v0.16.0  (cached)
-> retrieved bos.0.2.1  (cached)
-> retrieved bisect_ppx.2.8.3  (cached)
-> retrieved camlp-streams.5.0.1  (cached)
-> retrieved checkseum.0.5.2  (cached)
-> retrieved brr.0.0.7  (cached)
-> retrieved cmdliner.1.3.0  (cached)
-> installed conf-jq.1
-> installed conf-bash.1
-> retrieved cmarkit.0.3.0  (cached)
-> retrieved core_kernel.v0.16.0  (cached)
-> retrieved cppo.1.8.0  (cached)
-> retrieved crunch.3.3.1  (cached)
-> retrieved csexp.1.5.2  (cached)
-> retrieved core.v0.16.2  (cached)
-> retrieved decompress.1.5.3  (cached)
-> retrieved fieldslib.v0.16.0  (cached)
-> retrieved fmt.0.9.0  (cached)
-> retrieved fpath.0.7.3  (cached)
-> retrieved gen.1.1  (cached)
-> retrieved int_repr.v0.16.0  (cached)
-> retrieved jane-street-headers.v0.16.0  (cached)
-> retrieved jst-config.v0.16.0  (cached)
-> retrieved logs.0.7.0  (cached)
-> retrieved lwt.5.9.0  (cached)
-> retrieved mdx.2.5.0  (cached)
-> retrieved menhir.20240715, menhirCST.20240715, menhirLib.20240715, menhirSdk.20240715  (cached)
-> retrieved num.1.5-1  (cached)
-> retrieved ocaml-compiler-libs.v0.12.4  (cached)
-> retrieved ocaml-syntax-shims.1.0.0  (cached)
-> retrieved ocaml-version.3.7.3  (cached)
-> retrieved ocamlbuild.0.15.0  (cached)
-> retrieved ocamlfind.1.9.6  (cached)
-> retrieved ocplib-endian.1.2  (cached)
-> retrieved js_of_ocaml.5.9.1, js_of_ocaml-compiler.5.9.1, js_of_ocaml-toplevel.5.9.1  (cached)
-> retrieved odig.0.0.9  (cached)
-> retrieved optint.0.3.0  (cached)
-> installed num.1.5-1
-> retrieved ppx_assert.v0.16.0  (cached)
-> retrieved parsexp.v0.16.0  (cached)
-> retrieved ppx_base.v0.16.0  (cached)
-> retrieved dune.3.17.1, dune-configurator.3.17.1  (cached)
-> retrieved ppx_blob.0.9.0  (cached)
-> retrieved ppx_bin_prot.v0.16.0  (cached)
-> retrieved ppx_cold.v0.16.0  (cached)
-> retrieved ppx_bench.v0.16.0  (cached)
-> retrieved ppx_compare.v0.16.0  (cached)
-> retrieved ppx_derivers.1.2.1  (cached)
-> retrieved ppx_custom_printf.v0.16.0  (cached)
-> retrieved ppx_enumerate.v0.16.0  (cached)
-> retrieved ppx_disable_unused_warnings.v0.16.0  (cached)
-> retrieved ppx_fields_conv.v0.16.0  (cached)
-> retrieved ppx_fixed_literal.v0.16.0  (cached)
-> retrieved ppx_expect.v0.16.1  (cached)
-> retrieved ppx_hash.v0.16.0  (cached)
-> retrieved ppx_here.v0.16.0  (cached)
-> retrieved ppx_ignore_instrumentation.v0.16.0  (cached)
-> retrieved ppx_globalize.v0.16.0  (cached)
-> retrieved ppx_jane.v0.16.0  (cached)
-> retrieved ppx_inline_test.v0.16.1  (cached)
-> retrieved ppx_log.v0.16.0  (cached)
-> retrieved ppx_module_timer.v0.16.0  (cached)
-> retrieved ppx_let.v0.16.0  (cached)
-> retrieved ppx_optional.v0.16.0  (cached)
-> retrieved ppx_optcomp.v0.16.0  (cached)
-> retrieved ppx_pipebang.v0.16.0  (cached)
-> installed ocamlbuild.0.15.0
-> retrieved ppx_sexp_value.v0.16.0  (cached)
-> retrieved ppx_sexp_message.v0.16.0  (cached)
-> retrieved ppx_sexp_conv.v0.16.0  (cached)
-> retrieved ppx_stable_witness.v0.16.0  (cached)
-> retrieved ppx_string.v0.16.0  (cached)
-> retrieved ppx_stable.v0.16.0  (cached)
-> retrieved ppx_typerep_conv.v0.16.0  (cached)
-> retrieved ppx_tydi.v0.16.0  (cached)
-> retrieved ppx_variants_conv.v0.16.0  (cached)
-> retrieved re.1.12.0  (cached)
-> retrieved ptime.1.2.0  (cached)
-> retrieved result.1.5  (cached)
-> retrieved ppxlib.0.34.0  (cached)
-> retrieved seq.base  (cached)
-> retrieved sedlex.3.3  (cached)
-> retrieved rresult.0.7.0  (cached)
-> retrieved sexplib.v0.16.0  (cached)
-> retrieved splittable_random.v0.16.0  (cached)
-> retrieved sexplib0.v0.16.0  (cached)
-> retrieved stdlib-shims.0.3.0  (cached)
-> retrieved stdio.v0.16.0  (cached)
-> retrieved time_now.v0.16.0  (cached)
-> retrieved typerep.v0.16.0  (cached)
-> retrieved uutf.1.0.3  (cached)
-> retrieved topkg.1.0.7  (cached)
-> retrieved variantslib.v0.16.0  (cached)
-> retrieved tyxml.4.6.0  (cached)
-> installed cmdliner.1.3.0
-> installed seq.base
-> retrieved yojson.2.2.2  (cached)
-> installed ocamlfind.1.9.6
-> installed base-bytes.base
-> installed topkg.1.0.7
-> installed rresult.0.7.0
-> installed uutf.1.0.3
-> installed ptime.1.2.0
-> installed fmt.0.9.0
-> installed astring.0.8.5
-> installed fpath.0.7.3
-> installed cmarkit.0.3.0
-> installed dune.3.17.1
-> installed csexp.1.5.2
-> installed jane-street-headers.v0.16.0
-> installed ocaml-compiler-libs.v0.12.4
-> installed menhirSdk.20240715
-> installed menhirLib.20240715
-> installed menhirCST.20240715
-> installed gen.1.1
-> installed crunch.3.3.1
-> installed cppo.1.8.0
-> installed camlp-streams.5.0.1
-> installed base64.3.5.1
-> installed ppx_derivers.1.2.1
-> installed ocaml-version.3.7.3
-> installed result.1.5
-> installed optint.0.3.0
-> installed ocaml-syntax-shims.1.0.0
-> installed odoc-parser.dev
-> installed stdlib-shims.0.3.0
-> installed ocplib-endian.1.2
-> installed sexplib0.v0.16.0
-> installed dune-configurator.3.17.1
-> installed re.1.12.0
-> installed bigstringaf.0.10.0
-> installed yojson.2.2.2
-> installed b0.0.0.5
-> installed checkseum.0.5.2
-> installed parsexp.v0.16.0
-> installed alcotest.1.8.0
-> installed sexplib.v0.16.0
-> installed decompress.1.5.3
-> installed lwt.5.9.0
-> installed tyxml.4.6.0
-> installed odoc.dev
-> installed base.v0.16.3
-> installed fieldslib.v0.16.0
-> installed variantslib.v0.16.0
-> installed odig.0.0.9
-> installed stdio.v0.16.0
-> installed typerep.v0.16.0
-> installed ppxlib.0.34.0
-> installed menhir.20240715
-> installed ppx_globalize.v0.16.0
-> installed ppx_blob.0.9.0
-> installed ppx_disable_unused_warnings.v0.16.0
-> installed ppx_here.v0.16.0
-> installed ppx_cold.v0.16.0
-> installed ppx_ignore_instrumentation.v0.16.0
-> installed ppx_fixed_literal.v0.16.0
-> installed ppx_enumerate.v0.16.0
-> installed ppx_fields_conv.v0.16.0
-> installed ppx_compare.v0.16.0
-> installed ppx_optcomp.v0.16.0
-> installed bisect_ppx.2.8.3
-> installed ppx_pipebang.v0.16.0
-> installed ppx_optional.v0.16.0
-> installed ppx_tydi.v0.16.0
-> installed ppx_let.v0.16.0
-> installed ppx_stable_witness.v0.16.0
-> installed ppx_typerep_conv.v0.16.0
-> installed ppx_stable.v0.16.0
-> installed ppx_variants_conv.v0.16.0
-> installed ppx_sexp_conv.v0.16.0
-> installed sedlex.3.3
-> installed ppx_hash.v0.16.0
-> installed ppx_sexp_value.v0.16.0
-> installed ppx_assert.v0.16.0
-> installed ppx_sexp_message.v0.16.0
-> installed ppx_custom_printf.v0.16.0
-> installed ppx_base.v0.16.0
-> installed ppx_log.v0.16.0
-> installed jst-config.v0.16.0
-> installed ppx_string.v0.16.0
-> installed time_now.v0.16.0
-> installed bin_prot.v0.16.0
-> installed ppx_module_timer.v0.16.0
-> installed ppx_inline_test.v0.16.1
-> installed ppx_bin_prot.v0.16.0
-> installed ppx_bench.v0.16.0
-> installed ppx_expect.v0.16.1
-> installed splittable_random.v0.16.0
-> installed js_of_ocaml-compiler.5.9.1
-> installed base_quickcheck.v0.16.0
-> installed ppx_jane.v0.16.0
-> installed js_of_ocaml-toplevel.5.9.1
-> installed int_repr.v0.16.0
-> installed base_bigstring.v0.16.0
-> installed brr.0.0.7
-> installed js_of_ocaml.5.9.1
-> installed logs.0.7.0
-> installed mdx.2.5.0
-> installed bos.0.2.1
-> installed core.v0.16.2
-> installed core_kernel.v0.16.0
Done.
# To update the current shell environment, run: eval $(opam env)
2025-01-23 10:51.23 ---> using "a54517c2564cddac95c003fb7361f696158356524e8b67111df88c6b1ccf0610" from cache


/: (copy (src .) (dst ./src))
2025-01-23 10:51.25 ---> saved as "2fedaf1f0422a930eae19f443b6c987d3ce52477f52b375ca76cec198efc1174"


/: (run (shell "cd ./src && opam exec -- dune build --only-packages=sherlodoc,odoc,odoc-parser,odoc-md,odoc-bench @install @check @runtest && rm -rf _build"))
(cd _build/default/src/html_support_files && /Users/mac1000/.opam/4.14.2/bin/ocaml-crunch . -e js -e css -e ttf -e woff2 -o odoc_html_support_files.ml -m plain)
Generating odoc_html_support_files.ml
Skipping generation of .mli
(cd _build/.sandbox/04e2af1ea1f6425a32d497e0316878a8/default && /Users/mac1000/.opam/4.14.2/bin/menhir --table --external-tokens Tokens --explain src/parser/parser.mly --base src/parser/parser --infer-read-reply src/parser/parser__mock.mli.inferred)
Warning: 52 states have shift/reduce conflicts.
Warning: 5 states have reduce/reduce conflicts.
Warning: 236 shift/reduce conflicts were arbitrarily resolved.
Warning: 41 reduce/reduce conflicts were arbitrarily resolved.
File "<standard.mly>", line 109, characters 18-18:
Warning: production option(sequence_nonempty(inline_element(whitespace))) -> is never reduced.
Warning: in total, 1 production is never reduced.
(cd _build/default/sherlodoc/query/test && ./test.exe)
Testing `Query'.
This run has ID `IQWXA411'.


[OK]          Succ                 0   Succ.to_seq extra.
[OK]          Succ                 1   Succ.to_seq size 0.
[OK]          Succ                 2   Succ.to_seq size 7.
[OK]          Succ                 3   Succ.to_seq size 14.
[OK]          Succ                 4   Succ.to_seq size 21.
[OK]          Succ                 5   Succ.to_seq size 28.
[OK]          Succ                 6   Succ.to_seq size 35.
[OK]          Succ                 7   Succ.to_seq size 42.
[OK]          Succ                 8   Succ.to_seq size 49.
[OK]          Succ                 9   Succ.to_seq size 56.
[OK]          Succ                10   Succ.to_seq size 63.
[OK]          Succ                11   Succ.to_seq size 70.
[OK]          Succ                12   Succ.to_seq size 77.
[OK]          Succ                13   Succ.to_seq size 84.
[OK]          Succ                14   Succ.to_seq size 91.
[OK]          Succ                15   Succ.to_seq size 98.
[OK]          Succ                16   Succ.to_seq size 105.
[OK]          Succ                17   Succ.to_seq size 112.
[OK]          Succ                18   Succ.to_seq size 119.
[OK]          Succ                19   Succ.to_seq size 126.
[OK]          Succ                20   Succ.to_seq size 133.
[OK]          Succ                21   Succ.to_seq size 140.
[OK]          Succ                22   Succ.to_seq size 147.
[OK]          Succ                23   Succ.to_seq size 154.
[OK]          Succ                24   Succ.to_seq size 161.
[OK]          Succ                25   Succ.to_seq size 168.
[OK]          Succ                26   Succ.to_seq size 175.
[OK]          Succ                27   Succ.to_seq size 182.
[OK]          Succ                28   Succ.to_seq size 189.
[OK]          Succ                29   Succ.to_seq size 196.
[OK]          Succ                30   Succ.to_seq size 203.
[OK]          Succ                31   Succ.to_seq size 210.
[OK]          Succ                32   Succ.to_seq size 217.
[OK]          Succ                33   Succ.to_seq size 224.
[OK]          Succ                34   Succ.to_seq size 231.
[OK]          Succ                35   Succ.to_seq size 238.
[OK]          Succ                36   Succ.to_seq size 245.
[OK]          Succ                37   Succ.to_seq size 252.
[OK]          Succ                38   Succ.to_seq size 259.
[OK]          Succ                39   Succ.to_seq size 266.
[OK]          Succ                40   Succ.to_seq size 273.
[OK]          Succ                41   Succ.to_seq size 280.
[OK]          Succ                42   Succ.to_seq size 287.
[OK]          Succ                43   Succ.to_seq size 294.
[OK]          Succ                44   Succ.to_seq size 301.
[OK]          Succ                45   Succ.to_seq size 308.
[OK]          Succ                46   Succ.to_seq size 315.
[OK]          Succ                47   Succ.to_seq size 322.
[OK]          Succ                48   Succ.to_seq size 329.
[OK]          Succ                49   Succ.to_seq size 336.
[OK]          Succ                50   Succ.to_seq size 343.
[OK]          Type_parser          0   Type_parser size 0.
[OK]          Type_parser          1   Type_parser size 5.
[OK]          Type_parser          2   Type_parser size 10.
[OK]          Type_parser          3   Type_parser size 15.
[OK]          Type_parser          4   Type_parser size 20.
[OK]          Type_parser          5   Type_parser size 25.
[OK]          Type_parser          6   Type_parser size 30.
[OK]          Type_parser          7   Type_parser size 35.
[OK]          Type_parser          8   Type_parser size 40.
[OK]          Type_parser          9   Type_parser size 45.
[OK]          Type_parser         10   Type_parser size 50.
[OK]          Type_parser         11   Type_parser size 55.
[OK]          Type_parser         12   Type_parser size 60.
[OK]          Type_parser         13   Type_parser size 65.
[OK]          Type_parser         14   Type_parser size 70.
[OK]          Type_parser         15   Type_parser size 75.
[OK]          Type_parser         16   Type_parser size 80.
[OK]          Type_parser         17   Type_parser size 85.
[OK]          Type_parser         18   Type_parser size 90.
[OK]          Type_parser         19   Type_parser size 95.
[OK]          Type_parser         20   Type_parser size 100.
[OK]          Type_parser         21   Type_parser size 105.
[OK]          Type_parser         22   Type_parser size 110.
[OK]          Type_parser         23   Type_parser size 115.
[OK]          Type_parser         24   Type_parser size 120.
[OK]          Type_parser         25   Type_parser size 125.
[OK]          Type_parser         26   Type_parser size 130.
[OK]          Type_parser         27   Type_parser size 135.
[OK]          Type_parser         28   Type_parser size 140.
[OK]          Type_parser         29   Type_parser size 145.
[OK]          Type_parser         30   Type_parser size 150.
[OK]          Type_parser         31   Type_parser size 155.
[OK]          Type_parser         32   Type_parser size 160.
[OK]          Type_parser         33   Type_parser size 165.
[OK]          Type_parser         34   Type_parser size 170.
[OK]          Type_parser         35   Type_parser size 175.
[OK]          Type_parser         36   Type_parser size 180.
[OK]          Type_parser         37   Type_parser size 185.
[OK]          Type_parser         38   Type_parser size 190.
[OK]          Type_parser         39   Type_parser size 195.
[OK]          Type_parser         40   Type_parser size 200.
[OK]          Type_parser         41   Type_parser size 205.
[OK]          Type_parser         42   Type_parser size 210.
[OK]          Type_parser         43   Type_parser size 215.
[OK]          Type_parser         44   Type_parser size 220.
[OK]          Type_parser         45   Type_parser size 225.
[OK]          Type_parser         46   Type_parser size 230.
[OK]          Type_parser         47   Type_parser size 235.
[OK]          Type_parser         48   Type_parser size 240.
[OK]          Type_parser         49   Type_parser size 245.


Full test results in `~/src/_build/default/sherlodoc/query/test/_build/_tests/Query'.
Test Successful in 0.036s. 101 tests run.
File "src/parser/test/test_tables.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/src/parser/test/test_tables.ml _build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test_tables.ml.corrected
diff --git a/_build/default/src/parser/test/test_tables.ml b/_build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test_tables.ml.corrected
index d8840b0..7722e98 100644
--- a/_build/default/src/parser/test/test_tables.ml
+++ b/_build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test_tables.ml.corrected
@@ -46,30 +46,35 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 22))
-            (table (syntax heavy) (grid ()) (align "no alignment")))))
+          (((f.ml (1 0) (1 13))
+            (table (syntax heavy) (grid ()) (align "no alignment")))
+           ((f.ml (1 14) (1 21)) (paragraph (((f.ml (1 14) (1 21)) (word content)))))
+           ((f.ml (1 21) (1 22)) (paragraph (((f.ml (1 21) (1 22)) (word })))))))
(warnings
( "File \"f.ml\", line 1, characters 7-13:\
-           \n'absurd' is not allowed in '{table ...}' (table).\
-           \nSuggestion: Move outside of {table ...}, or inside {tr ...}"
-            "File \"f.ml\", line 1, characters 14-21:\
-           \n'content' is not allowed in '{table ...}' (table).\
-           \nSuggestion: Move outside of {table ...}, or inside {tr ...}"))) |}]
+           \nIllegal character or syntax 'absurd' in '{table ...}' (table)"
+            "File \"f.ml\", line 1, characters 21-22:\
+           \n''}'': bad markup."))) |}]


let bad_row =
test "{table {tr absurd content}}";
[%expect
{|
((output
-          (((f.ml (1 0) (1 27))
-            (table (syntax heavy) (grid ((row ()))) (align "no alignment")))))
+          (((f.ml (1 0) (1 18))
+            (table (syntax heavy) (grid ((row ()))) (align "no alignment")))
+           ((f.ml (1 18) (1 25)) (paragraph (((f.ml (1 18) (1 25)) (word content)))))
+           ((f.ml (1 25) (1 26)) (paragraph (((f.ml (1 25) (1 26)) (word })))))
+           ((f.ml (1 26) (1 27)) (paragraph (((f.ml (1 26) (1 27)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 11-17:\
-           \n'absurd' is not allowed in '{tr ...}' (table row).\
-           \nSuggestion: Move outside of {table ...}, or inside {td ...} or {th ...}"
-            "File \"f.ml\", line 1, characters 18-25:\
-           \n'content' is not allowed in '{tr ...}' (table row).\
-           \nSuggestion: Move outside of {table ...}, or inside {td ...} or {th ...}"))) |}]
+          ( "File \"f.ml\", line 1, characters 17-18:\
+           \nIllegal character or syntax ' ' in '{table ...}' (table)"
+            "File \"f.ml\", line 1, characters 11-17:\
+           \nIllegal character or syntax 'absurd' in '{tr ...}' (table row)"
+            "File \"f.ml\", line 1, characters 25-26:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 1, characters 26-27:\
+           \n''}'': bad markup."))) |}]


let multiple_headers =
test "{table {tr {th}} {tr {th}} {tr {td}}}";
@@ -91,8 +96,7 @@ let%expect_test _ =
(table (syntax heavy) (grid ((row ((data ()))))) (align "no alignment")))))
(warnings
( "File \"f.ml\", line 1, characters 16-16:\
-               \nEnd of text is not allowed in table.\
-               \nSuggestion: add '}'."))) |}]
+               \nIllegal character or syntax '' in '{table ...}' (table)"))) |}]


let complex_table =
test
@@ -125,71 +129,20 @@ let%expect_test _ =
}
}
|};
-      [%expect
-        {|
-        ((output
-          (((f.ml (2 8) (28 9))
-            (table (syntax heavy)
-             (grid
-              ((row
-                ((header
-                  (((f.ml (4 16) (4 19))
-                    (paragraph (((f.ml (4 16) (4 19)) (word xxx)))))))
-                 (header
-                  (((f.ml (5 16) (5 19))
-                    (paragraph (((f.ml (5 16) (5 19)) (word yyy)))))))))
-               (row
-                ((data
-                  (((f.ml (8 16) (8 36))
-                    (paragraph
-                     (((f.ml (8 16) (8 20)) (word aaaa)) ((f.ml (8 20) (8 21)) space)
-                      ((f.ml (8 21) (8 24)) (word bbb)) ((f.ml (8 24) (8 25)) space)
-                      ((f.ml (8 25) (8 28)) (word ccc)) ((f.ml (8 28) (8 29)) space)
-                      ((f.ml (8 29) (8 36))
-                       (italic (((f.ml (8 32) (8 35)) (word ddd))))))))))
-                 (data
-                  (((f.ml (11 15) (11 32))
-                    (table (syntax heavy) (grid ((row ((data ())))))
-                     (align "no alignment")))))))
-               (row
-                ((data
-                  (((f.ml (16 15) (18 20))
-                    (unordered light
-                     ((((f.ml (16 17) (16 20))
-                        (paragraph (((f.ml (16 17) (16 20)) (word aaa))))))
-                      (((f.ml (17 17) (17 20))
-                        (paragraph (((f.ml (17 17) (17 20)) (word bbb))))))
-                      (((f.ml (18 17) (18 20))
-                        (paragraph (((f.ml (18 17) (18 20)) (word ccc)))))))))))
-                 (data
-                  (((f.ml (21 14) (25 15))
-                    (table (syntax light)
-                     (grid
-                      ((row
-                        ((header
-                          (((f.ml (22 17) (22 18))
-                            (paragraph (((f.ml (22 17) (22 18)) (word x)))))))
-                         (header
-                          (((f.ml (22 21) (22 22))
-                            (paragraph (((f.ml (22 21) (22 22)) (word y)))))))
-                         (header
-                          (((f.ml (22 25) (22 26))
-                            (paragraph (((f.ml (22 25) (22 26)) (word z)))))))))
-                       (row
-                        ((data
-                          (((f.ml (24 17) (24 18))
-                            (paragraph (((f.ml (24 17) (24 18)) (word 1)))))))
-                         (data
-                          (((f.ml (24 21) (24 22))
-                            (paragraph (((f.ml (24 21) (24 22)) (word 2)))))))
-                         (data
-                          (((f.ml (24 25) (24 26))
-                            (paragraph (((f.ml (24 25) (24 26)) (word 3)))))))))))
-                     (align (default default default))))))))))
-             (align "no alignment")))))
-         (warnings ())) |}]
+      [%expect.unreachable]
end in
()
+[@@expect.uncaught_exn {|
+  (* CR expect_test_collector: This test expectation appears to contain a backtrace.
+     This is strongly discouraged as backtraces are fragile.
+     Please change this test to not include a backtrace. *)
+
+  (Odoc_parser__Parser.MenhirBasics.Error)
+  Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
+  Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
+  Called from Odoc_parser_test__Test.test in file "src/parser/test/test.ml", line 28, characters 12-57
+  Called from Odoc_parser_test__Test_tables.(fun).Heavy.complex_table in file "src/parser/test/test_tables.ml", line 98, characters 6-528
+  Called from Expect_test_collector.Make.Instance_io.exec in file "collector/expect_test_collector.ml", line 234, characters 12-19 |}]


let%expect_test _ =
let module Light = struct
@@ -199,7 +152,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 4))
-            (table (syntax light) (grid ()) (align "no alignment")))))
+            (table (syntax light) (grid ((row ()))) (align "no alignment")))))
(warnings ())) |}]


let unclosed_table =
@@ -210,8 +163,8 @@ let%expect_test _ =
(((f.ml (1 0) (1 3))
(table (syntax light) (grid ()) (align "no alignment")))))
(warnings
-          ( "File \"f.ml\", line 1, characters 2-3:\
-           \nEnd of text is not allowed in table.\
+          ( "File \"f.ml\", line 1, characters 0-3:\
+           \nEnd of text is not allowed in '{t ...}' (table).\
\nSuggestion: add '}'."))) |}]


let simple =
@@ -228,8 +181,9 @@ let%expect_test _ =
(grid
((row
((data
-                  (((f.ml (3 12) (3 13))
-                    (paragraph (((f.ml (3 12) (3 13)) (word a)))))))))))
+                  (((f.ml (3 11) (3 14))
+                    (paragraph
+                     (((f.ml (3 12) (3 13)) (word a)) ((f.ml (3 13) (3 14)) space))))))))))
(align "no alignment")))))
(warnings ())) |}]


@@ -252,15 +206,16 @@ let%expect_test _ =
(((f.ml (3 11) (3 12))
(paragraph (((f.ml (3 11) (3 12)) (word a)))))))
(data
-                  (((f.ml (3 16) (3 19))
+                  (((f.ml (3 13) (3 19))
(paragraph (((f.ml (3 16) (3 19)) (word *b*)))))))))
(row
((data
(((f.ml (4 11) (4 13))
(paragraph (((f.ml (4 11) (4 13)) (word *c)))))))
(data
-                  (((f.ml (4 15) (4 17))
-                    (paragraph (((f.ml (4 15) (4 17)) (word d*)))))))))))
+                  (((f.ml (4 14) (4 18))
+                    (paragraph
+                     (((f.ml (4 15) (4 17)) (word d*)) ((f.ml (4 17) (4 18)) space))))))))))
(align "no alignment")))))
(warnings ())) |}]


@@ -278,8 +233,9 @@ let%expect_test _ =
(grid
((row
((data
-                  (((f.ml (3 11) (3 13))
-                    (paragraph (((f.ml (3 11) (3 13)) (word `a)))))))
+                  (((f.ml (3 10) (3 14))
+                    (paragraph
+                     (((f.ml (3 11) (3 13)) (word `a)) ((f.ml (3 13) (3 14)) space))))))
(data
(((f.ml (3 15) (3 16))
(paragraph (((f.ml (3 15) (3 16)) (word `)))))))))))
@@ -301,10 +257,13 @@ let%expect_test _ =
(grid
((row
((data
-                  (((f.ml (4 9) (4 10)) (paragraph (((f.ml (4 9) (4 10)) (word x)))))))
+                  (((f.ml (4 8) (4 11))
+                    (paragraph
+                     (((f.ml (4 9) (4 10)) (word x)) ((f.ml (4 10) (4 11)) space))))))
(data
-                  (((f.ml (4 13) (4 14))
-                    (paragraph (((f.ml (4 13) (4 14)) (word y)))))))))))
+                  (((f.ml (4 12) (4 15))
+                    (paragraph
+                     (((f.ml (4 13) (4 14)) (word y)) ((f.ml (4 14) (4 15)) space))))))))))
(align (default default))))))
(warnings ())) |}]


@@ -323,16 +282,22 @@ let%expect_test _ =
(grid
((row
((data
-                    (((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
+                    (((f.ml (3 8) (3 11))
+                      (paragraph
+                       (((f.ml (3 9) (3 10)) (word x)) ((f.ml (3 10) (3 11)) space))))))
(data
-                    (((f.ml (3 13) (3 14))
-                      (paragraph (((f.ml (3 13) (3 14)) (word y)))))))))
+                    (((f.ml (3 12) (3 15))
+                      (paragraph
+                       (((f.ml (3 13) (3 14)) (word y)) ((f.ml (3 14) (3 15)) space))))))))
(row
((data
-                    (((f.ml (4 9) (4 10)) (paragraph (((f.ml (4 9) (4 10)) (word x)))))))
+                    (((f.ml (4 8) (4 11))
+                      (paragraph
+                       (((f.ml (4 9) (4 10)) (word x)) ((f.ml (4 10) (4 11)) space))))))
(data
-                    (((f.ml (4 13) (4 14))
-                      (paragraph (((f.ml (4 13) (4 14)) (word y)))))))))))
+                    (((f.ml (4 12) (4 15))
+                      (paragraph
+                       (((f.ml (4 13) (4 14)) (word y)) ((f.ml (4 14) (4 15)) space))))))))))
(align "no alignment")))))
(warnings ())) |}]


@@ -346,7 +311,7 @@ let%expect_test _ =
{|
((output
(((f.ml (2 6) (4 7))
-            (table (syntax light) (grid ()) (align (default default))))))
+            (table (syntax light) (grid ((row ()))) (align (default default))))))
(warnings ())) |}]


let no_data =
@@ -364,10 +329,13 @@ let%expect_test _ =
(grid
((row
((header
-                    (((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
+                    (((f.ml (3 8) (3 11))
+                      (paragraph
+                       (((f.ml (3 9) (3 10)) (word x)) ((f.ml (3 10) (3 11)) space))))))
(header
-                    (((f.ml (3 13) (3 14))
-                      (paragraph (((f.ml (3 13) (3 14)) (word y)))))))))))
+                    (((f.ml (3 12) (3 15))
+                      (paragraph
+                       (((f.ml (3 13) (3 14)) (word y)) ((f.ml (3 14) (3 15)) space))))))))))
(align (default default))))))
(warnings ())) |}]


@@ -387,16 +355,21 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word a)))))))
+                  (((f.ml (3 8) (3 11))
+                    (paragraph
+                     (((f.ml (3 9) (3 10)) (word a)) ((f.ml (3 10) (3 11)) space))))))
(header
-                  (((f.ml (3 13) (3 14))
-                    (paragraph (((f.ml (3 13) (3 14)) (word b)))))))
+                  (((f.ml (3 12) (3 15))
+                    (paragraph
+                     (((f.ml (3 13) (3 14)) (word b)) ((f.ml (3 14) (3 15)) space))))))
(header
-                  (((f.ml (3 17) (3 18))
-                    (paragraph (((f.ml (3 17) (3 18)) (word c)))))))
+                  (((f.ml (3 16) (3 19))
+                    (paragraph
+                     (((f.ml (3 17) (3 18)) (word c)) ((f.ml (3 18) (3 19)) space))))))
(header
-                  (((f.ml (3 21) (3 22))
-                    (paragraph (((f.ml (3 21) (3 22)) (word d)))))))))))
+                  (((f.ml (3 20) (3 23))
+                    (paragraph
+                     (((f.ml (3 21) (3 22)) (word d)) ((f.ml (3 22) (3 23)) space))))))))))
(align (default left right center))))))
(warnings ())) |}]


@@ -417,27 +390,35 @@ let%expect_test _ =
(grid
((row
((header
-                    (((f.ml (3 8) (3 9)) (paragraph (((f.ml (3 8) (3 9)) (word a)))))))
+                    (((f.ml (3 8) (3 10))
+                      (paragraph
+                       (((f.ml (3 8) (3 9)) (word a)) ((f.ml (3 9) (3 10)) space))))))
(header
-                    (((f.ml (3 12) (3 13))
-                      (paragraph (((f.ml (3 12) (3 13)) (word b)))))))
+                    (((f.ml (3 11) (3 14))
+                      (paragraph
+                       (((f.ml (3 12) (3 13)) (word b)) ((f.ml (3 13) (3 14)) space))))))
(header
-                    (((f.ml (3 16) (3 17))
-                      (paragraph (((f.ml (3 16) (3 17)) (word c)))))))
+                    (((f.ml (3 15) (3 18))
+                      (paragraph
+                       (((f.ml (3 16) (3 17)) (word c)) ((f.ml (3 17) (3 18)) space))))))
(header
-                    (((f.ml (3 20) (3 21))
+                    (((f.ml (3 19) (3 21))
(paragraph (((f.ml (3 20) (3 21)) (word d)))))))))
(row
((data
-                    (((f.ml (5 8) (5 9)) (paragraph (((f.ml (5 8) (5 9)) (word a)))))))
+                    (((f.ml (5 8) (5 10))
+                      (paragraph
+                       (((f.ml (5 8) (5 9)) (word a)) ((f.ml (5 9) (5 10)) space))))))
(data
-                    (((f.ml (5 12) (5 13))
-                      (paragraph (((f.ml (5 12) (5 13)) (word b)))))))
+                    (((f.ml (5 11) (5 14))
+                      (paragraph
+                       (((f.ml (5 12) (5 13)) (word b)) ((f.ml (5 13) (5 14)) space))))))
(data
-                    (((f.ml (5 16) (5 17))
-                      (paragraph (((f.ml (5 16) (5 17)) (word c)))))))
+                    (((f.ml (5 15) (5 18))
+                      (paragraph
+                       (((f.ml (5 16) (5 17)) (word c)) ((f.ml (5 17) (5 18)) space))))))
(data
-                    (((f.ml (5 20) (5 21))
+                    (((f.ml (5 19) (5 21))
(paragraph (((f.ml (5 20) (5 21)) (word d)))))))))))
(align (default left right center))))))
(warnings ())) |}]
@@ -458,34 +439,63 @@ let%expect_test _ =
[%expect
{|
((output
-            (((f.ml (2 6) (10 7))
+            (((f.ml (2 6) (14 7))
(table (syntax light)
(grid
((row
-                  ((header
-                    (((f.ml (4 9) (4 10)) (paragraph (((f.ml (4 9) (4 10)) (word a)))))))
-                   (header
-                    (((f.ml (4 13) (4 14))
-                      (paragraph (((f.ml (4 13) (4 14)) (word b)))))))
-                   (header
-                    (((f.ml (4 17) (4 18))
-                      (paragraph (((f.ml (4 17) (4 18)) (word c)))))))
-                   (header
-                    (((f.ml (4 21) (4 22))
-                      (paragraph (((f.ml (4 21) (4 22)) (word d)))))))))
-                 (row
((data
-                    (((f.ml (8 9) (8 10)) (paragraph (((f.ml (8 9) (8 10)) (word a)))))))
+                    (((f.ml (5 8) (5 11))
+                      (paragraph
+                       (((f.ml (5 9) (5 10)) (word a)) ((f.ml (5 10) (5 11)) space))))))
(data
-                    (((f.ml (8 13) (8 14))
-                      (paragraph (((f.ml (8 13) (8 14)) (word b)))))))
+                    (((f.ml (5 12) (5 15))
+                      (paragraph
+                       (((f.ml (5 13) (5 14)) (word b)) ((f.ml (5 14) (5 15)) space))))))
(data
-                    (((f.ml (8 17) (8 18))
-                      (paragraph (((f.ml (8 17) (8 18)) (word c)))))))
+                    (((f.ml (5 16) (5 19))
+                      (paragraph
+                       (((f.ml (5 17) (5 18)) (word c)) ((f.ml (5 18) (5 19)) space))))))
(data
-                    (((f.ml (8 21) (8 22))
-                      (paragraph (((f.ml (8 21) (8 22)) (word d)))))))))))
-               (align (default default default default))))))
+                    (((f.ml (5 20) (5 23))
+                      (paragraph
+                       (((f.ml (5 21) (5 22)) (word d)) ((f.ml (5 22) (5 23)) space))))))))
+                 (row
+                  ((data (((f.ml (8 0) (8 7)) (paragraph ()))))
+                   (data
+                    (((f.ml (8 8) (8 11))
+                      (paragraph (((f.ml (8 8) (8 11)) (word ---)))))))
+                   (data
+                    (((f.ml (8 12) (8 15))
+                      (paragraph (((f.ml (8 12) (8 15)) (word ---)))))))
+                   (data
+                    (((f.ml (8 16) (8 19))
+                      (paragraph (((f.ml (8 16) (8 19)) (word ---)))))))
+                   (data
+                    (((f.ml (8 20) (8 23))
+                      (paragraph (((f.ml (8 20) (8 23)) (word ---)))))))))
+                 (row
+                  ((data (((f.ml (11 0) (11 7)) (paragraph ()))))
+                   (data
+                    (((f.ml (11 8) (11 11))
+                      (paragraph
+                       (((f.ml (11 9) (11 10)) (word a))
+                        ((f.ml (11 10) (11 11)) space))))))
+                   (data
+                    (((f.ml (11 12) (11 15))
+                      (paragraph
+                       (((f.ml (11 13) (11 14)) (word b))
+                        ((f.ml (11 14) (11 15)) space))))))
+                   (data
+                    (((f.ml (11 16) (11 19))
+                      (paragraph
+                       (((f.ml (11 17) (11 18)) (word c))
+                        ((f.ml (11 18) (11 19)) space))))))
+                   (data
+                    (((f.ml (11 20) (11 23))
+                      (paragraph
+                       (((f.ml (11 21) (11 22)) (word d))
+                        ((f.ml (11 22) (11 23)) space))))))))))
+               (align "no alignment")))))
(warnings ())) |}]


let light_table_markup =
@@ -504,30 +514,33 @@ let%expect_test _ =
(grid
((row
((header
-                    (((f.ml (3 9) (3 31))
+                    (((f.ml (3 8) (3 32))
(paragraph
(((f.ml (3 9) (3 14))
(italic (((f.ml (3 12) (3 13)) (word a)))))
((f.ml (3 14) (3 15)) space)
((f.ml (3 15) (3 28)) (google.com ()))
((f.ml (3 28) (3 29)) space)
-                        ((f.ml (3 29) (3 31)) (word "\\t")))))))
-                   (header ())
+                        ((f.ml (3 29) (3 31)) (word "\\t"))
+                        ((f.ml (3 31) (3 32)) space))))))
+                   (header (((f.ml (3 33) (3 34)) (paragraph ()))))
(header
-                    (((f.ml (3 36) (3 57))
+                    (((f.ml (3 35) (3 58))
(paragraph
(((f.ml (3 36) (3 41)) (math_span b))
((f.ml (3 41) (3 42)) space)
((f.ml (3 42) (3 47))
(emphasis (((f.ml (3 45) (3 46)) (word c)))))
((f.ml (3 47) (3 48)) space)
-                        ((f.ml (3 48) (3 57)) (raw_markup () " xyz ")))))))
+                        ((f.ml (3 48) (3 57)) (raw_markup () " xyz "))
+                        ((f.ml (3 57) (3 58)) space))))))
(header
-                    (((f.ml (3 60) (3 71))
+                    (((f.ml (3 59) (3 72))
(paragraph
(((f.ml (3 60) (3 65)) (bold (((f.ml (3 63) (3 64)) (word d)))))
((f.ml (3 65) (3 66)) space)
-                        ((f.ml (3 66) (3 71)) (code_span foo)))))))))))
+                        ((f.ml (3 66) (3 71)) (code_span foo))
+                        ((f.ml (3 71) (3 72)) space))))))))))
(align (default default default default))))))
(warnings ())) |}]


@@ -548,30 +561,32 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (2 11) (2 13))
-                    (paragraph (((f.ml (2 11) (2 13)) (word h1)))))))
+                  (((f.ml (2 10) (2 24))
+                    (paragraph
+                     (((f.ml (2 11) (2 13)) (word h1)) ((f.ml (2 13) (2 24)) space))))))
(header
-                  (((f.ml (2 26) (2 28))
-                    (paragraph (((f.ml (2 26) (2 28)) (word h2)))))))))
+                  (((f.ml (2 25) (2 38))
+                    (paragraph
+                     (((f.ml (2 26) (2 28)) (word h2)) ((f.ml (2 28) (2 38)) space))))))))
(row
((data
-                  (((f.ml (4 11) (5 23))
+                  (((f.ml (4 10) (5 24))
(paragraph
(((f.ml (4 11) (5 23))
(emphasis
(((f.ml (4 14) (4 18)) (word with))
-                         ((f.ml (4 18) (5 14)) space)
-                         ((f.ml (5 14) (5 22)) (word newlines))))))))))
+                         ((f.ml (4 18) (5 0)) space) ((f.ml (5 0) (5 14)) space)
+                         ((f.ml (5 14) (5 22)) (word newlines)))))
+                      ((f.ml (5 23) (5 24)) space))))))
(data
-                  (((f.ml (5 26) (5 37))
+                  (((f.ml (5 25) (5 38))
(paragraph
(((f.ml (5 26) (5 31)) (bold (((f.ml (5 29) (5 30)) (word d)))))
((f.ml (5 31) (5 32)) space)
-                      ((f.ml (5 32) (5 37)) (code_span foo)))))))))))
+                      ((f.ml (5 32) (5 37)) (code_span foo))
+                      ((f.ml (5 37) (5 38)) space))))))))))
(align (default default))))))
-         (warnings
-          ( "File \"f.ml\", line 4, character 11 to line 5, character 23:\
-           \nLine break is not allowed in '{t ...}' (table)."))) |}]
+         (warnings ())) |}]


let no_space =
test
@@ -589,17 +604,20 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 11) (3 12))
-                    (paragraph (((f.ml (3 11) (3 12)) (word a)))))))
+                  (((f.ml (3 10) (3 13))
+                    (paragraph
+                     (((f.ml (3 11) (3 12)) (word a)) ((f.ml (3 12) (3 13)) space))))))
(header
-                  (((f.ml (3 15) (3 16))
-                    (paragraph (((f.ml (3 15) (3 16)) (word b)))))))
+                  (((f.ml (3 14) (3 17))
+                    (paragraph
+                     (((f.ml (3 15) (3 16)) (word b)) ((f.ml (3 16) (3 17)) space))))))
(header
(((f.ml (3 18) (3 19))
(paragraph (((f.ml (3 18) (3 19)) (word c)))))))
(header
-                  (((f.ml (3 21) (3 22))
-                    (paragraph (((f.ml (3 21) (3 22)) (word d)))))))))))
+                  (((f.ml (3 20) (3 23))
+                    (paragraph
+                     (((f.ml (3 21) (3 22)) (word d)) ((f.ml (3 22) (3 23)) space))))))))))
(align (default right left center))))))
(warnings ())) |}]


@@ -623,7 +641,7 @@ let%expect_test _ =
(table (syntax light)
(grid
((row
-                ((header ())
+                ((header (((_none_ (1 0) (1 0)) (paragraph ()))))
(header
(((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word a)))))))
(header
@@ -661,7 +679,7 @@ let%expect_test _ =
(data
(((f.ml (9 10) (9 11))
(paragraph (((f.ml (9 10) (9 11)) (word h)))))))
-                 (data ())))))
+                 (data (((_none_ (1 0) (1 0)) (paragraph ()))))))))
(align (left right))))))
(warnings ())) |}]


@@ -680,14 +698,18 @@ let%expect_test _ =
(table (syntax light)
(grid
((row
-                ((header ())
+                ((header
+                  (((f.ml (3 12) (3 21))
+                    (paragraph
+                     (((f.ml (3 18) (3 20)) (word "")) ((f.ml (3 20) (3 21)) space))))))
(header
-                  (((f.ml (3 23) (3 24))
-                    (paragraph (((f.ml (3 23) (3 24)) (word b)))))))))))
+                  (((f.ml (3 22) (3 25))
+                    (paragraph
+                     (((f.ml (3 23) (3 24)) (word b)) ((f.ml (3 24) (3 25)) space))))))))))
(align (default default))))))
(warnings
-          ( "File \"f.ml\", line 3, characters 13-20:\
-           \n'{[...]}' (code block) is not allowed in '{t ...}' (table)."))) |}]
+          ( "File \"f.ml\", line 3, characters 18-20:\
+           \nIllegal character or syntax ']}' in '{t ...}' (table)"))) |}]


let block_element_in_row =
test
@@ -705,16 +727,25 @@ let%expect_test _ =
(table (syntax light)
(grid
((row
-                ((header
-                  (((f.ml (4 13) (4 14))
-                    (paragraph (((f.ml (4 13) (4 14)) (word a)))))))
-                 (header
-                  (((f.ml (4 17) (4 18))
-                    (paragraph (((f.ml (4 17) (4 18)) (word b)))))))))))
-             (align (default default))))))
+                ((data
+                  (((f.ml (4 12) (4 15))
+                    (paragraph
+                     (((f.ml (4 13) (4 14)) (word a)) ((f.ml (4 14) (4 15)) space))))))
+                 (data
+                  (((f.ml (4 16) (4 19))
+                    (paragraph
+                     (((f.ml (4 17) (4 18)) (word b)) ((f.ml (4 18) (4 19)) space))))))))
+               (row
+                ((data
+                  (((f.ml (5 12) (5 15))
+                    (paragraph (((f.ml (5 12) (5 15)) (word ---)))))))
+                 (data
+                  (((f.ml (5 16) (5 19))
+                    (paragraph (((f.ml (5 16) (5 19)) (word ---)))))))))))
+             (align (default))))))
(warnings
-          ( "File \"f.ml\", line 3, characters 11-18:\
-           \n'{[...]}' (code block) is not allowed in '{t ...}' (table)."))) |}]
+          ( "File \"f.ml\", line 3, characters 16-18:\
+           \nIllegal character or syntax ']}' in '{t ...}' (table)"))) |}]


let more_cells_later =
test
@@ -733,19 +764,26 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
+                  (((f.ml (3 8) (3 11))
+                    (paragraph
+                     (((f.ml (3 9) (3 10)) (word x)) ((f.ml (3 10) (3 11)) space))))))
(header
-                  (((f.ml (3 13) (3 14))
-                    (paragraph (((f.ml (3 13) (3 14)) (word y)))))))))
+                  (((f.ml (3 12) (3 15))
+                    (paragraph
+                     (((f.ml (3 13) (3 14)) (word y)) ((f.ml (3 14) (3 15)) space))))))))
(row
((data
-                  (((f.ml (5 9) (5 10)) (paragraph (((f.ml (5 9) (5 10)) (word x)))))))
+                  (((f.ml (5 8) (5 11))
+                    (paragraph
+                     (((f.ml (5 9) (5 10)) (word x)) ((f.ml (5 10) (5 11)) space))))))
(data
-                  (((f.ml (5 13) (5 14))
-                    (paragraph (((f.ml (5 13) (5 14)) (word y)))))))
+                  (((f.ml (5 12) (5 15))
+                    (paragraph
+                     (((f.ml (5 13) (5 14)) (word y)) ((f.ml (5 14) (5 15)) space))))))
(data
-                  (((f.ml (5 17) (5 18))
-                    (paragraph (((f.ml (5 17) (5 18)) (word z)))))))))))
+                  (((f.ml (5 16) (5 19))
+                    (paragraph
+                     (((f.ml (5 17) (5 18)) (word z)) ((f.ml (5 18) (5 19)) space))))))))))
(align (default default))))))
(warnings ())) |}]


@@ -766,10 +804,13 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 9) (3 10)) (paragraph (((f.ml (3 9) (3 10)) (word x)))))))
+                  (((f.ml (3 8) (3 11))
+                    (paragraph
+                     (((f.ml (3 9) (3 10)) (word x)) ((f.ml (3 10) (3 11)) space))))))
(header
-                  (((f.ml (3 13) (3 14))
-                    (paragraph (((f.ml (3 13) (3 14)) (word y)))))))))
+                  (((f.ml (3 12) (3 15))
+                    (paragraph
+                     (((f.ml (3 13) (3 14)) (word y)) ((f.ml (3 14) (3 15)) space))))))))
(row
((data
(((f.ml (5 7) (5 8)) (paragraph (((f.ml (5 7) (5 8)) (word x)))))))))))
@@ -793,23 +834,24 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 4) (3 25))
+                  (((f.ml (3 3) (3 26))
(paragraph
(((f.ml (3 4) (3 10)) (word Header))
((f.ml (3 10) (3 11)) space) ((f.ml (3 11) (3 14)) (word and))
((f.ml (3 14) (3 15)) space)
((f.ml (3 15) (3 20)) (word other))
-                      ((f.ml (3 20) (3 21)) space)
-                      ((f.ml (3 21) (3 25)) (word word)))))))))
+                      ((f.ml (3 20) (3 21)) space) ((f.ml (3 21) (3 25)) (word word))
+                      ((f.ml (3 25) (3 26)) space))))))))
(row
((data
-                  (((f.ml (5 4) (5 24))
+                  (((f.ml (5 3) (5 26))
(paragraph
(((f.ml (5 4) (5 8)) (word cell)) ((f.ml (5 8) (5 9)) space)
((f.ml (5 9) (5 12)) (word and)) ((f.ml (5 12) (5 13)) space)
((f.ml (5 13) (5 18)) (word other))
((f.ml (5 18) (5 19)) space)
-                      ((f.ml (5 19) (5 24)) (word words)))))))))))
+                      ((f.ml (5 19) (5 24)) (word words))
+                      ((f.ml (5 24) (5 26)) space))))))))))
(align (default))))))
(warnings ())) |}]


@@ -830,22 +872,22 @@ let%expect_test _ =
(grid
((row
((header
-                  (((f.ml (3 4) (3 21))
+                  (((f.ml (3 3) (3 22))
(paragraph
(((f.ml (3 4) (3 10)) (word Header))
((f.ml (3 10) (3 11)) space)
((f.ml (3 11) (3 16)) (word other))
-                      ((f.ml (3 16) (3 17)) space)
-                      ((f.ml (3 17) (3 21)) (word word)))))))))
+                      ((f.ml (3 16) (3 17)) space) ((f.ml (3 17) (3 21)) (word word))
+                      ((f.ml (3 21) (3 22)) space))))))))
(row
((data
-                  (((f.ml (5 4) (5 21))
+                  (((f.ml (5 3) (5 22))
(paragraph
(((f.ml (5 4) (5 10)) (word Header))
((f.ml (5 10) (5 11)) space)
((f.ml (5 11) (5 16)) (word other))
-                      ((f.ml (5 16) (5 17)) space)
-                      ((f.ml (5 17) (5 21)) (word word)))))))))))
+                      ((f.ml (5 16) (5 17)) space) ((f.ml (5 17) (5 21)) (word word))
+                      ((f.ml (5 21) (5 22)) space))))))))))
(align (default))))))
(warnings ())) |}]
end in
File "src/parser/test/test.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/src/parser/test/test.ml _build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test.ml.corrected
diff --git a/_build/default/src/parser/test/test.ml b/_build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test.ml.corrected
index 0b9b2b5..6626b8e 100644
--- a/_build/default/src/parser/test/test.ml
+++ b/_build/.sandbox/03dacfce973c21a5ccb3002c249a752a/default/src/parser/test/test.ml.corrected
@@ -125,7 +125,8 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))))
+          (((f.ml (1 0) (2 0))
+            (paragraph (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 0)) space))))))
(warnings ())) |}]


let two_lines_cr_lf =
@@ -162,8 +163,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 4))
(paragraph
-             (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 1)) space)
-              ((f.ml (2 1) (2 4)) (word bar)))))))
+             (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 0)) space)
+              ((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word bar)))))))
(warnings ())) |}]


let trailing_space_on_line =
@@ -184,8 +185,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 4))
(paragraph
-             (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 1)) space)
-              ((f.ml (2 1) (2 4)) (word bar)))))))
+             (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 0)) space)
+              ((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word bar)))))))
(warnings ())) |}]


let trailing_tab_on_line =
@@ -218,7 +219,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-         ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))
+         ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word bar)))))))
(warnings ())) |}]


let leading_space =
@@ -227,7 +228,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-         ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))
+         ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word bar)))))))
(warnings ())) |}]


let trailing_space =
@@ -236,7 +237,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-         ((f.ml (3 1) (3 4)) (paragraph (((f.ml (3 1) (3 4)) (word bar)))))))
+         ((f.ml (4 1) (4 4)) (paragraph (((f.ml (4 1) (4 4)) (word bar)))))))
(warnings ())) |}]


let cr_lf =
@@ -245,7 +246,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-         ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))
+         ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word bar)))))))
(warnings ())) |}]


let mixed_cr_lf =
@@ -254,7 +255,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-         ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))
+         ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word bar)))))))
(warnings ())) |}]
end in
()
@@ -750,7 +751,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 5)) (bold (((f.ml (2 1) (2 4)) (word foo))))))))))
+             (((f.ml (1 0) (2 5))
+               (bold (((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word foo))))))))))
(warnings ())) |}]


let no_leading_whitespace =
@@ -761,9 +763,7 @@ let%expect_test _ =
(((f.ml (1 0) (1 6))
(paragraph
(((f.ml (1 0) (1 6)) (bold (((f.ml (1 2) (1 5)) (word foo))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b' should be followed by space, a tab, or a new line."))) |}]
+         (warnings ())) |}]


let trailing_whitespace =
test "{b foo }";
@@ -780,9 +780,9 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 1))
+          (((f.ml (1 0) (2 0))
(paragraph
-             (((f.ml (1 0) (2 1)) (bold (((f.ml (1 3) (1 6)) (word foo))))))))))
+             (((f.ml (1 0) (2 0)) (bold (((f.ml (1 3) (1 6)) (word foo))))))))))
(warnings ())) |}]


let trailing_cr_lf =
@@ -790,9 +790,9 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 1))
+          (((f.ml (1 0) (2 0))
(paragraph
-             (((f.ml (1 0) (2 1)) (bold (((f.ml (1 3) (1 6)) (word foo))))))))))
+             (((f.ml (1 0) (2 0)) (bold (((f.ml (1 3) (1 6)) (word foo))))))))))
(warnings ())) |}]


let two_words =
@@ -863,90 +863,94 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 5))
-            (paragraph (((f.ml (1 0) (1 5)) (bold (((f.ml (1 3) (1 4)) (word -))))))))))
-         (warnings ())) |}]
+          (((f.ml (1 0) (1 4)) (paragraph (((f.ml (1 0) (1 4)) (bold ())))))
+           ((f.ml (1 4) (1 5)) (paragraph (((f.ml (1 4) (1 5)) (word })))))))
+         (warnings
+          ( "File \"f.ml\", line 1, characters 0-4:\
+           \nIllegal character or syntax '-' in '{b ...}' (boldface text)"
+            "File \"f.ml\", line 1, characters 4-5:\
+           \n''}'': bad markup."))) |}]


let minus_list_item =
test "{b foo\n - bar}";
[%expect
{|
((output
-          (((f.ml (1 0) (2 7))
+          (((f.ml (1 0) (2 6))
(paragraph
-             (((f.ml (1 0) (2 7))
-               (bold
-                (((f.ml (1 3) (1 6)) (word foo)) ((f.ml (1 6) (2 1)) space)
-                 ((f.ml (2 1) (2 2)) (word -)) ((f.ml (2 2) (2 3)) space)
-                 ((f.ml (2 3) (2 6)) (word bar))))))))))
+             (((f.ml (1 0) (2 2)) (bold ())) ((f.ml (2 2) (2 3)) space)
+              ((f.ml (2 3) (2 6)) (word bar)))))
+           ((f.ml (2 6) (2 7)) (paragraph (((f.ml (2 6) (2 7)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 2, characters 1-2:\
-           \n'-' (bulleted list item) is not allowed in '{b ...}' (boldface text).\
-           \nSuggestion: move '-' so it isn't the first thing on the line."))) |}]
+          ( "File \"f.ml\", line 1, character 0 to line 2, character 2:\
+           \nIllegal character or syntax '-' in '{b ...}' (boldface text)"
+            "File \"f.ml\", line 2, characters 6-7:\
+           \n''}'': bad markup."))) |}]


let plus_list_item =
test "{b foo\n + bar}";
[%expect
{|
((output
-          (((f.ml (1 0) (2 7))
+          (((f.ml (1 0) (2 6))
(paragraph
-             (((f.ml (1 0) (2 7))
-               (bold
-                (((f.ml (1 3) (1 6)) (word foo)) ((f.ml (1 6) (2 1)) space)
-                 ((f.ml (2 1) (2 2)) (word +)) ((f.ml (2 2) (2 3)) space)
-                 ((f.ml (2 3) (2 6)) (word bar))))))))))
+             (((f.ml (1 0) (2 2)) (bold ())) ((f.ml (2 2) (2 3)) space)
+              ((f.ml (2 3) (2 6)) (word bar)))))
+           ((f.ml (2 6) (2 7)) (paragraph (((f.ml (2 6) (2 7)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 2, characters 1-2:\
-           \n'+' (numbered list item) is not allowed in '{b ...}' (boldface text).\
-           \nSuggestion: move '+' so it isn't the first thing on the line."))) |}]
+          ( "File \"f.ml\", line 1, character 0 to line 2, character 2:\
+           \nIllegal character or syntax '+' in '{b ...}' (boldface text)"
+            "File \"f.ml\", line 2, characters 6-7:\
+           \n''}'': bad markup."))) |}]


let immediate_minus_list_item =
test "{b\n- foo}";
[%expect
{|
((output
-          (((f.ml (1 0) (2 6))
+          (((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 6))
-               (bold
-                (((f.ml (2 0) (2 1)) (word -)) ((f.ml (2 1) (2 2)) space)
-                 ((f.ml (2 2) (2 5)) (word foo))))))))))
+             (((f.ml (1 0) (2 1)) (bold ())) ((f.ml (2 1) (2 2)) space)
+              ((f.ml (2 2) (2 5)) (word foo)))))
+           ((f.ml (2 5) (2 6)) (paragraph (((f.ml (2 5) (2 6)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 2, characters 0-1:\
-           \n'-' (bulleted list item) is not allowed in '{b ...}' (boldface text).\
-           \nSuggestion: move '-' so it isn't the first thing on the line."))) |}]
+          ( "File \"f.ml\", line 1, character 0 to line 2, character 1:\
+           \nIllegal character or syntax '-' in '{b ...}' (boldface text)"
+            "File \"f.ml\", line 2, characters 5-6:\
+           \n''}'': bad markup."))) |}]


let immediate_plus_list_item =
test "{b\n+ foo}";
[%expect
{|
((output
-          (((f.ml (1 0) (2 6))
+          (((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 6))
-               (bold
-                (((f.ml (2 0) (2 1)) (word +)) ((f.ml (2 1) (2 2)) space)
-                 ((f.ml (2 2) (2 5)) (word foo))))))))))
+             (((f.ml (1 0) (2 1)) (bold ())) ((f.ml (2 1) (2 2)) space)
+              ((f.ml (2 2) (2 5)) (word foo)))))
+           ((f.ml (2 5) (2 6)) (paragraph (((f.ml (2 5) (2 6)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 2, characters 0-1:\
-           \n'+' (numbered list item) is not allowed in '{b ...}' (boldface text).\
-           \nSuggestion: move '+' so it isn't the first thing on the line."))) |}]
+          ( "File \"f.ml\", line 1, character 0 to line 2, character 1:\
+           \nIllegal character or syntax '+' in '{b ...}' (boldface text)"
+            "File \"f.ml\", line 2, characters 5-6:\
+           \n''}'': bad markup."))) |}]


let blank_line =
test "{b foo\n\nbar}";
[%expect
{|
((output
-          (((f.ml (1 0) (3 4))
+          (((f.ml (1 0) (4 3))
(paragraph
-             (((f.ml (1 0) (3 4))
-               (bold
-                (((f.ml (1 3) (1 6)) (word foo)) ((f.ml (2 0) (2 0)) space)
-                 ((f.ml (3 0) (3 3)) (word bar))))))))))
+             (((f.ml (1 0) (4 0)) (bold ())) ((f.ml (4 0) (4 3)) (word bar)))))
+           ((f.ml (4 3) (4 4)) (paragraph (((f.ml (4 3) (4 4)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 2, characters 0-0:\
-           \nBlank line is not allowed in '{b ...}' (boldface text)."))) |}]
+          ( "File \"f.ml\", line 1, character 0 to line 4, character 0:\
+           \nIllegal character or syntax '\
+           \n\
+           \n' in '{b ...}' (bolface text)"
+            "File \"f.ml\", line 4, characters 3-4:\
+           \n''}'': bad markup."))) |}]


let immediate_blank_line =
test "{b";
@@ -955,38 +959,27 @@ let%expect_test _ =
((output (((f.ml (1 0) (1 2)) (paragraph (((f.ml (1 0) (1 2)) (bold ())))))))
(warnings
( "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b' should be followed by space, a tab, or a new line."
-            "File \"f.ml\", line 1, characters 2-2:\
-           \nEnd of text is not allowed in '{b ...}' (boldface text)."
-            "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b ...}' (boldface text) should not be empty."))) |}]
+           \nEnd of text is not allowed in '{b ...}' (boldface text).\
+           \nSuggestion: add '}'."))) |}]


let end_of_comment =
test "{b foo";
[%expect
{|
-        ((output
-          (((f.ml (1 0) (1 6))
-            (paragraph
-             (((f.ml (1 0) (1 6)) (bold (((f.ml (1 3) (1 6)) (word foo))))))))))
+        ((output (((f.ml (1 0) (1 6)) (paragraph (((f.ml (1 0) (1 6)) (bold ())))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 6-6:\
-           \nEnd of text is not allowed in '{b ...}' (boldface text)."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-6:\
+           \nIllegal character or syntax '' in '{b ...}' (boldface text)"))) |}]


let nested_code_block =
test "{b {[foo]}";
[%expect
{|
((output
-          (((f.ml (1 0) (1 2)) (paragraph (((f.ml (1 0) (1 2)) (bold ())))))
-           ((f.ml (1 3) (1 10)) (code_block ((f.ml (1 5) (1 8)) foo)))))
+          (((f.ml (1 0) (1 10)) (paragraph (((f.ml (1 0) (1 10)) (bold ())))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 3-10:\
-           \n'{[...]}' (code block) is not allowed in '{b ...}' (boldface text)."
-            "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b ...}' (boldface text) should not be empty."
-            "File \"f.ml\", line 1, characters 3-10:\
-           \n'{[...]}' (code block) should begin on its own line."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-10:\
+           \nIllegal character or syntax ']}' in '{b ...}' (boldface text)"))) |}]


let degenerate =
test "{b}";
@@ -1047,7 +1040,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 5)) (italic (((f.ml (2 1) (2 4)) (word foo))))))))))
+             (((f.ml (1 0) (2 5))
+               (italic (((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word foo))))))))))
(warnings ())) |}]
end in
()
@@ -1091,7 +1085,9 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 5)) (emphasis (((f.ml (2 1) (2 4)) (word foo))))))))))
+             (((f.ml (1 0) (2 5))
+               (emphasis
+                (((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word foo))))))))))
(warnings ())) |}]
end in
()
@@ -1145,7 +1141,9 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 5)) (superscript (((f.ml (2 1) (2 4)) (word foo))))))))))
+             (((f.ml (1 0) (2 5))
+               (superscript
+                (((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word foo))))))))))
(warnings ())) |}]


let no_whitespace =
@@ -1219,7 +1217,9 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 5))
(paragraph
-             (((f.ml (1 0) (2 5)) (subscript (((f.ml (2 1) (2 4)) (word foo))))))))))
+             (((f.ml (1 0) (2 5))
+               (subscript
+                (((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 4)) (word foo))))))))))
(warnings ())) |}]


let no_whitespace =
@@ -1571,7 +1571,7 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 8)) (simple ((f.ml (1 2) (1 8)) "(.*()}") ())))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 2-8:\
+          ( "File \"f.ml\", line 1, characters 0-8:\
\nOpen bracket '(' is never closed."))) |}]


let operator_eof =
@@ -1583,7 +1583,7 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 7)) (simple ((f.ml (1 2) (1 7)) "(.*()") ())))))))
(warnings
-            ( "File \"f.ml\", line 1, characters 2-7:\
+            ( "File \"f.ml\", line 1, characters 0-7:\
\nOpen bracket '(' is never closed."))) |}]
end in
()
@@ -1776,11 +1776,10 @@ let%expect_test _ =
(((f.ml (1 0) (1 6)) (with_text ((f.ml (1 3) (1 6)) foo) ())))))))
(warnings
( "File \"f.ml\", line 1, characters 0-6:\
-           \nOpen bracket '{{!' is never closed."
-            "File \"f.ml\", line 1, characters 6-6:\
-           \nEnd of text is not allowed in '{{!...} ...}' (cross-reference)."
+           \nEnd of text is not allowed in '{{!...} ...}' (cross-reference).\
+           \nSuggestion: add '}'."
"File \"f.ml\", line 1, characters 0-6:\
-           \n'{{!...} ...}' (cross-reference) should not be empty."))) |}]
+           \nOpen bracket '{{!' is never closed."))) |}]


let unterminated_content =
test "{{!foo} bar";
@@ -1791,10 +1790,11 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 11))
(with_text ((f.ml (1 3) (1 7)) foo)
-                (((f.ml (1 8) (1 11)) (word bar))))))))))
+                (((f.ml (1 7) (1 8)) space) ((f.ml (1 8) (1 11)) (word bar))))))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 11-11:\
-           \nEnd of text is not allowed in '{{!...} ...}' (cross-reference)."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-11:\
+           \nEnd of text is not allowed in '{{!...} ...}' (cross-reference).\
+           \nSuggestion: add '}'."))) |}]
end in
()


@@ -1812,15 +1812,15 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11))
-            (simple ((f.ml (1 7) (1 10)) (Reference foo)) "" image))
-           ((f.ml (3 0) (3 11))
-            (simple ((f.ml (3 7) (3 10)) (Reference foo)) "" audio))
-           ((f.ml (5 0) (5 11))
-            (simple ((f.ml (5 7) (5 10)) (Reference foo)) "" video))
-           ((f.ml (7 0) (7 11)) (simple ((f.ml (7 7) (7 10)) (Link foo)) "" image))
-           ((f.ml (9 0) (9 11)) (simple ((f.ml (9 7) (9 10)) (Link foo)) "" audio))
-           ((f.ml (11 0) (11 11))
-            (simple ((f.ml (11 7) (11 10)) (Link foo)) "" video))))
+            (simple ((f.ml (1 7) (1 11)) (Reference foo)) "" image))
+           ((f.ml (3 0) (4 11))
+            (simple ((f.ml (3 7) (3 11)) (Reference foo)) "" audio))
+           ((f.ml (5 0) (7 11))
+            (simple ((f.ml (5 7) (5 11)) (Reference foo)) "" video))
+           ((f.ml (7 0) (10 11)) (simple ((f.ml (7 7) (7 11)) (Link foo)) "" image))
+           ((f.ml (9 0) (13 11)) (simple ((f.ml (9 7) (9 11)) (Link foo)) "" audio))
+           ((f.ml (11 0) (16 11))
+            (simple ((f.ml (11 7) (11 11)) (Link foo)) "" video))))
(warnings ())) |}]


let basic =
@@ -1835,15 +1835,17 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 16))
-            (simple ((f.ml (1 8) (1 12)) (Reference foo)) bar image))
-           ((f.ml (3 0) (3 16))
-            (simple ((f.ml (3 8) (3 12)) (Reference foo)) bar audio))
-           ((f.ml (5 0) (5 16))
-            (simple ((f.ml (5 8) (5 12)) (Reference foo)) bar video))
-           ((f.ml (7 0) (7 16)) (simple ((f.ml (7 8) (7 12)) (Link foo)) bar image))
-           ((f.ml (9 0) (9 16)) (simple ((f.ml (9 8) (9 12)) (Link foo)) bar audio))
-           ((f.ml (11 0) (11 16))
-            (simple ((f.ml (11 8) (11 12)) (Link foo)) bar video))))
+            (with_text ((f.ml (1 8) (1 12)) (Reference foo)) bar image))
+           ((f.ml (3 0) (4 16))
+            (with_text ((f.ml (3 8) (3 12)) (Reference foo)) bar audio))
+           ((f.ml (5 0) (7 16))
+            (with_text ((f.ml (5 8) (5 12)) (Reference foo)) bar video))
+           ((f.ml (7 0) (10 16))
+            (with_text ((f.ml (7 8) (7 12)) (Link foo)) bar image))
+           ((f.ml (9 0) (13 16))
+            (with_text ((f.ml (9 8) (9 12)) (Link foo)) bar audio))
+           ((f.ml (11 0) (16 16))
+            (with_text ((f.ml (11 8) (11 12)) (Link foo)) bar video))))
(warnings ())) |}]


let empty =
@@ -1852,10 +1854,8 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 13))
-               (simple ((f.ml (1 8) (1 12)) (Reference foo)) "" image))))
-            (warnings
-             ( "File \"f.ml\", line 1, characters 11-12:\
-              \n'{{image!...} ...}' (image-reference) should not be empty."))) |}]
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) "" image))))
+            (warnings ())) |}]


let whitespace =
test "{{image!foo}   }";
@@ -1863,10 +1863,8 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 16))
-               (simple ((f.ml (1 8) (1 12)) (Reference foo)) "" image))))
-            (warnings
-             ( "File \"f.ml\", line 1, characters 11-15:\
-              \n'{{image!...} ...}' (image-reference) should not be empty."))) |}]
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) "   " image))))
+            (warnings ())) |}]


let trimming =
test "{{image!foo}    hello     }";
@@ -1874,7 +1872,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 27))
-               (simple ((f.ml (1 8) (1 12)) (Reference foo)) hello image))))
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) "    hello     " image))))
(warnings ())) |}]


let nested_markup_is_uninterpreted =
@@ -1883,7 +1881,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 20))
-               (simple ((f.ml (1 8) (1 12)) (Reference foo)) "{b bar}" image))))
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) "{b bar}" image))))
(warnings ())) |}]


let in_markup =
@@ -1894,7 +1892,7 @@ let%expect_test _ =
(((f.ml (1 0) (1 26))
(unordered heavy
((((f.ml (1 8) (1 24))
-                   (simple ((f.ml (1 16) (1 20)) (Reference foo)) bar image))))))))
+                   (with_text ((f.ml (1 16) (1 20)) (Reference foo)) bar image))))))))
(warnings ())) |}]


let unterminated_image =
@@ -1903,14 +1901,12 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11))
-               (simple ((f.ml (1 8) (1 10)) (Reference foo)) "" image))))
+               (with_text ((f.ml (1 8) (1 11)) (Reference foo)) "" image))))
(warnings
-             ( "File \"f.ml\", line 1, characters 0-11:\
-              \nOpen bracket '{{image!' is never closed."
-               "File \"f.ml\", line 1, characters 11-11:\
-              \nEnd of text is not allowed in '{{image!...} ...}' (image-reference)."
-               "File \"f.ml\", line 1, characters 11-10:\
-              \n'{{image!...} ...}' (image-reference) should not be empty."))) |}]
+             ( "File \"f.ml\", line 1, characters 11-11:\
+              \nEnd of text is not allowed in {{image!."
+               "File \"f.ml\", line 1, characters 0-11:\
+              \nOpen bracket '{{image!' is never closed."))) |}]


let unterminated_image_simple =
test "{image!foo";
@@ -1918,7 +1914,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 10))
-               (simple ((f.ml (1 7) (1 9)) (Reference foo)) "" image))))
+               (simple ((f.ml (1 7) (1 10)) (Reference foo)) "" image))))
(warnings
( "File \"f.ml\", line 1, characters 0-10:\
\nOpen bracket '{image!' is never closed."))) |}]
@@ -1929,14 +1925,12 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11))
-               (simple ((f.ml (1 8) (1 10)) (Reference foo)) "" video))))
+               (with_text ((f.ml (1 8) (1 11)) (Reference foo)) "" video))))
(warnings
-             ( "File \"f.ml\", line 1, characters 0-11:\
-              \nOpen bracket '{{video!' is never closed."
-               "File \"f.ml\", line 1, characters 11-11:\
-              \nEnd of text is not allowed in '{{video!...} ...}' (video-reference)."
-               "File \"f.ml\", line 1, characters 11-10:\
-              \n'{{video!...} ...}' (video-reference) should not be empty."))) |}]
+             ( "File \"f.ml\", line 1, characters 11-11:\
+              \nEnd of text is not allowed in {{video!."
+               "File \"f.ml\", line 1, characters 0-11:\
+              \nOpen bracket '{{video!' is never closed."))) |}]


let unterminated_video_simple =
test "{video!foo";
@@ -1944,7 +1938,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 10))
-               (simple ((f.ml (1 7) (1 9)) (Reference foo)) "" video))))
+               (simple ((f.ml (1 7) (1 10)) (Reference foo)) "" video))))
(warnings
( "File \"f.ml\", line 1, characters 0-10:\
\nOpen bracket '{video!' is never closed."))) |}]
@@ -1955,14 +1949,12 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11))
-               (simple ((f.ml (1 8) (1 10)) (Reference foo)) "" audio))))
+               (with_text ((f.ml (1 8) (1 11)) (Reference foo)) "" audio))))
(warnings
-             ( "File \"f.ml\", line 1, characters 0-11:\
-              \nOpen bracket '{{audio!' is never closed."
-               "File \"f.ml\", line 1, characters 11-11:\
-              \nEnd of text is not allowed in '{{audio!...} ...}' (audio-reference)."
-               "File \"f.ml\", line 1, characters 11-10:\
-              \n'{{audio!...} ...}' (audio-reference) should not be empty."))) |}]
+             ( "File \"f.ml\", line 1, characters 11-11:\
+              \nEnd of text is not allowed in {{audio!."
+               "File \"f.ml\", line 1, characters 0-11:\
+              \nOpen bracket '{{audio!' is never closed."))) |}]


let unterminated_audio_simple =
test "{audio!foo";
@@ -1970,7 +1962,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 10))
-               (simple ((f.ml (1 7) (1 9)) (Reference foo)) "" audio))))
+               (simple ((f.ml (1 7) (1 10)) (Reference foo)) "" audio))))
(warnings
( "File \"f.ml\", line 1, characters 0-10:\
\nOpen bracket '{audio!' is never closed."))) |}]
@@ -1981,18 +1973,18 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 16))
-               (simple ((f.ml (1 8) (1 11)) (Reference foo)) bar image))))
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) " bar" image))))
(warnings
( "File \"f.ml\", line 1, characters 16-16:\
-              \nEnd of text is not allowed in '{{image!...} ...}' (image-reference)."))) |}]
+              \nEnd of text is not allowed in {{image!."))) |}]


let newline_in_content =
test "{{image!foo} bar \n baz}";
[%expect
{|
((output
-             (((f.ml (1 0) (2 5))
-               (simple ((f.ml (1 8) (2 -6)) (Reference foo)) "bar   baz" image))))
+             (((f.ml (1 0) (1 23))
+               (with_text ((f.ml (1 8) (1 12)) (Reference foo)) " bar   baz" image))))
(warnings ())) |}]
end in
()
@@ -2006,7 +1998,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 12))
(paragraph
-             (((f.ml (1 0) (1 12)) (foo (((f.ml (1 8) (1 11)) (word bar))))))))))
+             (((f.ml (1 0) (1 12))
+               (foo (((f.ml (1 7) (1 8)) space) ((f.ml (1 8) (1 11)) (word bar))))))))))
(warnings ())) |}]


let nested_markup =
@@ -2018,7 +2011,8 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 16))
(foo
-                (((f.ml (1 8) (1 15)) (bold (((f.ml (1 11) (1 14)) (word bar)))))))))))))
+                (((f.ml (1 7) (1 8)) space)
+                 ((f.ml (1 8) (1 15)) (bold (((f.ml (1 11) (1 14)) (word bar)))))))))))))
(warnings ())) |}]


let in_markup =
@@ -2030,7 +2024,9 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 16))
(emphasis
-                (((f.ml (1 3) (1 15)) (foo (((f.ml (1 11) (1 14)) (word bar)))))))))))))
+                (((f.ml (1 3) (1 15))
+                  (foo
+                   (((f.ml (1 10) (1 11)) space) ((f.ml (1 11) (1 14)) (word bar)))))))))))))
(warnings ())) |}]


let no_separating_space =
@@ -2052,7 +2048,10 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 21))
(foo
-                (((f.ml (1 8) (1 20)) (bar (((f.ml (1 16) (1 19)) (word baz)))))))))))))
+                (((f.ml (1 7) (1 8)) space)
+                 ((f.ml (1 8) (1 20))
+                  (bar
+                   (((f.ml (1 15) (1 16)) space) ((f.ml (1 16) (1 19)) (word baz)))))))))))))
(warnings ())) |}]


let nested_through_emphasis =
@@ -2064,9 +2063,13 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 25))
(foo
-                (((f.ml (1 8) (1 24))
+                (((f.ml (1 7) (1 8)) space)
+                 ((f.ml (1 8) (1 24))
(emphasis
-                   (((f.ml (1 11) (1 23)) (bar (((f.ml (1 19) (1 22)) (word baz))))))))))))))))
+                   (((f.ml (1 11) (1 23))
+                     (bar
+                      (((f.ml (1 18) (1 19)) space)
+                       ((f.ml (1 19) (1 22)) (word baz))))))))))))))))
(warnings ())) |}]


let reference_through_emphasis =
@@ -2078,7 +2081,8 @@ let%expect_test _ =
(paragraph
(((f.ml (1 0) (1 19))
(foo
-                (((f.ml (1 8) (1 18))
+                (((f.ml (1 7) (1 8)) space)
+                 ((f.ml (1 8) (1 18))
(emphasis
(((f.ml (1 11) (1 17)) (simple ((f.ml (1 13) (1 17)) bar) ())))))))))))))
(warnings ())) |}]
@@ -2094,7 +2098,10 @@ let%expect_test _ =
(with_text ((f.ml (1 3) (1 7)) foo)
(((f.ml (1 8) (1 24))
(emphasis
-                   (((f.ml (1 11) (1 23)) (bar (((f.ml (1 19) (1 22)) (word baz))))))))))))))))
+                   (((f.ml (1 11) (1 23))
+                     (bar
+                      (((f.ml (1 18) (1 19)) space)
+                       ((f.ml (1 19) (1 22)) (word baz))))))))))))))))
(warnings ())) |}]


let empty_target =
@@ -2103,9 +2110,11 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 9))
-            (paragraph (((f.ml (1 0) (1 9)) ("" (((f.ml (1 5) (1 8)) (word foo))))))))))
+            (paragraph
+             (((f.ml (1 0) (1 9))
+               ("" (((f.ml (1 4) (1 5)) space) ((f.ml (1 5) (1 8)) (word foo))))))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-4:\
+          ( "File \"f.ml\", line 1, characters 0-9:\
\n'{{:...} ...}' (external link) should not be empty."))) |}]


let whitespace_only_in_target =
@@ -2115,17 +2124,18 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 10))
(paragraph
-             (((f.ml (1 0) (1 10)) ("" (((f.ml (1 6) (1 9)) (word foo))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-5:\
-           \n'{{:...} ...}' (external link) should not be empty."))) |}]
+             (((f.ml (1 0) (1 10))
+               (" " (((f.ml (1 5) (1 6)) space) ((f.ml (1 6) (1 9)) (word foo))))))))))
+         (warnings ())) |}]


let empty =
test "{{:foo}}";
[%expect
{|
((output (((f.ml (1 0) (1 8)) (paragraph (((f.ml (1 0) (1 8)) (foo ())))))))
-         (warnings ())) |}]
+         (warnings
+          ( "File \"f.ml\", line 1, characters 0-8:\
+           \n'{{:...} ...}' (external link) should not be empty."))) |}]


let internal_whitespace =
test "{{:foo bar} baz}";
@@ -2134,7 +2144,9 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 16))
(paragraph
-             (((f.ml (1 0) (1 16)) ("foo bar" (((f.ml (1 12) (1 15)) (word baz))))))))))
+             (((f.ml (1 0) (1 16))
+               ("foo bar"
+                (((f.ml (1 11) (1 12)) space) ((f.ml (1 12) (1 15)) (word baz))))))))))
(warnings ())) |}]


let unterminated =
@@ -2144,9 +2156,10 @@ let%expect_test _ =
((output (((f.ml (1 0) (1 6)) (paragraph (((f.ml (1 0) (1 6)) (foo ())))))))
(warnings
( "File \"f.ml\", line 1, characters 0-6:\
-           \nOpen bracket '{{:' is never closed."
-            "File \"f.ml\", line 1, characters 6-6:\
-           \nEnd of text is not allowed in '{{:...} ...}' (external link)."))) |}]
+           \nEnd of text is not allowed in '{{:...} ...}' (external link).\
+           \nSuggestion: add '}'."
+            "File \"f.ml\", line 1, characters 0-6:\
+           \nOpen bracket '{{:' is never closed."))) |}]


let single_braces =
test "{:foo}";
@@ -2177,7 +2190,7 @@ let%expect_test _ =
test "{: }";
[%expect
{|
-        ((output (((f.ml (1 0) (1 4)) (paragraph (((f.ml (1 0) (1 4)) ("" ())))))))
+        ((output (((f.ml (1 0) (1 4)) (paragraph (((f.ml (1 0) (1 4)) (" " ())))))))
(warnings
( "File \"f.ml\", line 1, characters 0-4:\
\n'{:...} (external link)' should not be empty."))) |}]
@@ -2190,7 +2203,7 @@ let%expect_test _ =
test "{!modules:Foo}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 14)) (modules (((f.ml (1 0) (1 14)) Foo))))))
+        ((output (((f.ml (1 0) (1 14)) (modules (((f.ml (1 10) (1 13)) Foo))))))
(warnings ())) |}]


let two =
@@ -2199,7 +2212,9 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 18))
-            (modules (((f.ml (1 0) (1 18)) Foo) ((f.ml (1 0) (1 18)) Bar))))))
+            (modules
+             (((f.ml (1 10) (1 13)) Foo) ((f.ml (1 13) (1 14)) " ")
+              ((f.ml (1 14) (1 17)) Bar))))))
(warnings ())) |}]


let extra_whitespace =
@@ -2208,7 +2223,9 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 21))
-            (modules (((f.ml (1 0) (1 21)) Foo) ((f.ml (1 0) (1 21)) Bar))))))
+            (modules
+             (((f.ml (1 10) (1 11)) " ") ((f.ml (1 11) (1 14)) Foo)
+              ((f.ml (1 14) (1 16)) "  ") ((f.ml (1 16) (1 19)) Bar))))))
(warnings ())) |}]


let newline =
@@ -2217,7 +2234,9 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (2 4))
-            (modules (((f.ml (1 0) (2 4)) Foo) ((f.ml (1 0) (2 4)) Bar))))))
+            (modules
+             (((f.ml (1 10) (1 13)) Foo) ((f.ml (1 13) (2 0)) "\n")
+              ((f.ml (2 0) (2 3)) Bar))))))
(warnings ())) |}]


let cr_lf =
@@ -2226,7 +2245,9 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (2 4))
-            (modules (((f.ml (1 0) (2 4)) Foo) ((f.ml (1 0) (2 4)) Bar))))))
+            (modules
+             (((f.ml (1 10) (1 13)) Foo) ((f.ml (1 13) (2 0)) "\r\n")
+              ((f.ml (2 0) (2 3)) Bar))))))
(warnings ())) |}]


let empty =
@@ -2235,7 +2256,9 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 11)) (modules ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-11:\
+          ( "File \"_none_\", line 1, characters 0-0:\
+           \n is not allowed in '{!modules ...}'."
+            "File \"_none_\", line 1, characters 0-0:\
\n'{!modules ...}' should not be empty."))) |}]


let whitespace_only =
@@ -2244,7 +2267,9 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 12)) (modules ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-12:\
+          ( "File \"_none_\", line 1, characters 0-0:\
+           \n is not allowed in '{!modules ...}'."
+            "File \"_none_\", line 1, characters 0-0:\
\n'{!modules ...}' should not be empty."))) |}]


let unterminated =
@@ -2253,10 +2278,11 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 10)) (modules ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 10-10:\
-           \nEnd of text is not allowed in '{!modules ...}'."
-            "File \"f.ml\", line 1, characters 0-10:\
-           \n'{!modules ...}' should not be empty."))) |}]
+          ( "File \"_none_\", line 1, characters 0-0:\
+           \nEnd of text is not allowed in '{!modules ...}'.\
+           \nSuggestion: add '}'."
+            "File \"_none_\", line 1, characters 0-0:\
+           \n is not allowed in '{!modules ...}'."))) |}]


let in_paragraph =
test "foo {!modules:Foo}";
@@ -2265,21 +2291,17 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 4))
(paragraph (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (1 4)) space))))
-           ((f.ml (1 4) (1 18)) (modules (((f.ml (1 4) (1 18)) Foo))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 4-18:\
-           \n'{!modules ...}' should begin on its own line."))) |}]
+           ((f.ml (1 4) (1 18)) (modules (((f.ml (1 14) (1 17)) Foo))))))
+         (warnings ())) |}]


let followed_by_word =
test "{!modules:Foo} foo";
[%expect
{|
((output
-          (((f.ml (1 0) (1 14)) (modules (((f.ml (1 0) (1 14)) Foo))))
+          (((f.ml (1 0) (1 14)) (modules (((f.ml (1 10) (1 13)) Foo))))
((f.ml (1 15) (1 18)) (paragraph (((f.ml (1 15) (1 18)) (word foo)))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 15-18:\
-           \nParagraph should begin on its own line."))) |}]
+         (warnings ())) |}]


let in_list =
test "- {!modules:Foo}";
@@ -2288,7 +2310,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 16))
(unordered light
-             ((((f.ml (1 2) (1 16)) (modules (((f.ml (1 2) (1 16)) Foo))))))))))
+             ((((f.ml (1 2) (1 16)) (modules (((f.ml (1 12) (1 15)) Foo))))))))))
(warnings ())) |}]
end in
()
@@ -2324,9 +2346,9 @@ let%expect_test _ =
test "{[\n  \n]}";
[%expect
{|
-        ((output (((f.ml (1 0) (3 2)) (code_block ((f.ml (1 2) (3 0)) "")))))
+        ((output (((f.ml (1 0) (3 0)) (code_block ((f.ml (1 2) (3 0)) "")))))
(warnings
-          ( "File \"f.ml\", line 1, character 0 to line 3, character 2:\
+          ( "File \"f.ml\", line 1, character 0 to line 3, character 0:\
\n'{[...]}' (code block) should not be empty."))) |}]


let whitespace =
@@ -2341,7 +2363,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 5)) (code_block ((f.ml (1 2) (2 3))  "foo\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 3))  "foo\
\nbar")))))
(warnings ())) |}]


@@ -2350,7 +2372,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 5)) (code_block ((f.ml (1 2) (2 3))  "foo\r\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 3))  "foo\r\
\nbar")))))
(warnings ())) |}]


@@ -2359,7 +2381,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (3 5)) (code_block ((f.ml (1 2) (3 3))  "foo\
+          (((f.ml (1 0) (3 0)) (code_block ((f.ml (1 2) (3 3))  "foo\
\n\
\nbar")))))
(warnings ())) |}]
@@ -2376,7 +2398,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 6)) (code_block ((f.ml (1 2) (2 4))  "foo\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 4))  "foo\
\nbar")))))
(warnings ())) |}]


@@ -2385,7 +2407,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 6)) (code_block ((f.ml (1 2) (2 4))  "foo\r\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 4))  "foo\r\
\nbar")))))
(warnings ())) |}]


@@ -2394,7 +2416,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 8)) (code_block ((f.ml (1 2) (2 6))  "foo\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 6))  "foo\
\nbar")))))
(warnings ())) |}]


@@ -2403,7 +2425,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 6)) (code_block ((f.ml (1 2) (2 4))  "  foo\
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 4))  "  foo\
\nbar")))))
(warnings ())) |}]


@@ -2412,8 +2434,8 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (2 11)) (code_block ((f.ml (1 2) (2 9))  "foo\
-                                                                \n   bar")))))
+          (((f.ml (1 0) (2 0)) (code_block ((f.ml (1 2) (2 9))  "foo\
+                                                               \n   bar")))))
(warnings ())) |}]


let leading_whitespace_with_empty_line =
@@ -2421,7 +2443,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (3 6)) (code_block ((f.ml (1 2) (3 4))  "foo\
+          (((f.ml (1 0) (3 0)) (code_block ((f.ml (1 2) (3 4))  "foo\
\n\
\nbar")))))
(warnings ())) |}]
@@ -2431,7 +2453,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (3 7)) (code_block ((f.ml (1 2) (3 5))  "foo\
+          (((f.ml (1 0) (3 0)) (code_block ((f.ml (1 2) (3 5))  "foo\
\n \
\nbar")))))
(warnings ())) |}]
@@ -2441,7 +2463,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (3 6)) (code_block ((f.ml (1 2) (3 4))  "foo\
+          (((f.ml (1 0) (3 0)) (code_block ((f.ml (1 2) (3 4))  "foo\
...TRUNCATED BY DUNE...
let items_on_separate_lines =
test "{ul {li foo}\n{li bar}}";
[%expect
{|
((output
-          (((f.ml (1 0) (2 9))
-            (unordered heavy
-             ((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo))))))
-              (((f.ml (2 4) (2 7)) (paragraph (((f.ml (2 4) (2 7)) (word bar)))))))))))
-         (warnings ())) |}]
+          (((f.ml (1 0) (2 3)) (unordered heavy ()))
+           ((f.ml (2 4) (2 7)) (paragraph (((f.ml (2 4) (2 7)) (word bar)))))
+           ((f.ml (2 7) (2 8)) (paragraph (((f.ml (2 7) (2 8)) (word })))))
+           ((f.ml (2 8) (2 9)) (paragraph (((f.ml (2 8) (2 9)) (word })))))))
+         (warnings
+          ( "File \"f.ml\", line 1, character 0 to line 2, character 3:\
+           \nIllegal character or syntax '{li' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 2, characters 7-8:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 2, characters 8-9:\
+           \n''}'': bad markup."))) |}]


let blank_line =
test "{ul {li foo}\n\n{li bar}}";
[%expect
{|
((output
-          (((f.ml (1 0) (3 9))
+          (((f.ml (1 0) (4 0))
(unordered heavy
-             ((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo))))))
-              (((f.ml (3 4) (3 7)) (paragraph (((f.ml (3 4) (3 7)) (word bar)))))))))))
-         (warnings ())) |}]
+             ((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))))
+           ((f.ml (4 0) (4 8)) (paragraph (((f.ml (4 4) (4 7)) (word bar)))))
+           ((f.ml (4 8) (4 9)) (paragraph (((f.ml (4 8) (4 9)) (word })))))))
+         (warnings
+          ( "File \"f.ml\", line 1, character 0 to line 4, character 0:\
+           \nIllegal character or syntax '\
+           \n\
+           \n' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 4, characters 0-8:\
+           \n'{li ...}' (list item) is not allowed in top-level text.\
+           \nSuggestion: Move '{li ...}' (list item) into '{ol ...}' (numbered list) or '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 4, characters 8-9:\
+           \n''}'': bad markup."))) |}]


let blank_line_in_item =
test "{ul {li foo\n\nbar}}";
[%expect
{|
((output
-          (((f.ml (1 0) (3 5))
-            (unordered heavy
-             ((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))
-               ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))))))
-         (warnings ())) |}]
+          (((f.ml (1 0) (4 3)) (unordered heavy ()))
+           ((f.ml (4 3) (4 4)) (paragraph (((f.ml (4 3) (4 4)) (word })))))
+           ((f.ml (4 4) (4 5)) (paragraph (((f.ml (4 4) (4 5)) (word })))))))
+         (warnings
+          ( "File \"f.ml\", line 1, character 0 to line 4, character 3:\
+           \nIllegal character or syntax 'bar' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 4, characters 3-4:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 4, characters 4-5:\
+           \n''}'': bad markup."))) |}]


let junk =
test "{ul foo}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 8)) (unordered heavy ()))))
+        ((output
+          (((f.ml (1 0) (1 7)) (unordered heavy ()))
+           ((f.ml (1 7) (1 8)) (paragraph (((f.ml (1 7) (1 8)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-7:\
-           \n'foo' is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: move 'foo' into a list item, '{li ...}' or '{- ...}'."
-            "File \"f.ml\", line 1, characters 0-3:\
-           \n'{ul ...}' (bulleted list) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-7:\
+           \nIllegal character or syntax 'foo' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 1, characters 7-8:\
+           \n''}'': bad markup."))) |}]


let junk_with_no_whitespace =
test "{ulfoo}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 7)) (unordered heavy ()))))
+        ((output
+          (((f.ml (1 0) (1 6)) (unordered heavy ()))
+           ((f.ml (1 6) (1 7)) (paragraph (((f.ml (1 6) (1 7)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 3-6:\
-           \n'foo' is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: move 'foo' into a list item, '{li ...}' or '{- ...}'."
-            "File \"f.ml\", line 1, characters 0-3:\
-           \n'{ul ...}' (bulleted list) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-6:\
+           \nIllegal character or syntax 'foo' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 1, characters 6-7:\
+           \n''}'': bad markup."))) |}]


let empty =
test "{ul}";
@@ -3609,7 +3645,7 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 4)) (unordered heavy ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-3:\
+          ( "File \"f.ml\", line 1, characters 0-4:\
\n'{ul ...}' (bulleted list) should not be empty."))) |}]


let unterminated_list =
@@ -3618,11 +3654,8 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 3)) (unordered heavy ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 3-3:\
-           \nEnd of text is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: add '}'."
-            "File \"f.ml\", line 1, characters 0-3:\
-           \n'{ul ...}' (bulleted list) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-3:\
+           \nIllegal character or syntax '' in '{ul ...}' (bulleted list)"))) |}]


let no_whitespace =
test "{ul{li foo}}";
@@ -3639,7 +3672,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (4 2))
+          (((f.ml (1 0) (5 2))
(unordered heavy
((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))))))
(warnings ())) |}]
@@ -3653,11 +3686,10 @@ let%expect_test _ =
(unordered heavy
((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 11-11:\
-           \nEnd of text is not allowed in '{li ...}' (list item).\
-           \nSuggestion: add '}'."
+          ( "File \"f.ml\", line 1, characters 0-11:\
+           \nIllegal character or syntax '' in '{ul ...}' (bulleted list)"
"File \"f.ml\", line 1, characters 11-11:\
-           \nEnd of text is not allowed in '{ul ...}' (bulleted list).\
+           \nEnd of text is not allowed in '{- ...}' (list item).\
\nSuggestion: add '}'."))) |}]


let unterminated_left_curly_brace =
@@ -3669,11 +3701,10 @@ let%expect_test _ =
(unordered heavy
((((f.ml (1 7) (1 10)) (paragraph (((f.ml (1 7) (1 10)) (word foo)))))))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 10-10:\
-           \nEnd of text is not allowed in '{- ...}' (list item).\
-           \nSuggestion: add '}'."
+          ( "File \"f.ml\", line 1, characters 0-10:\
+           \nIllegal character or syntax '' in '{ul ...}' (bulleted list)"
"File \"f.ml\", line 1, characters 10-10:\
-           \nEnd of text is not allowed in '{ul ...}' (bulleted list).\
+           \nEnd of text is not allowed in '{- ...}' (list item).\
\nSuggestion: add '}'."))) |}]


let empty_li_styntax =
@@ -3682,7 +3713,7 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 10)) (unordered heavy (())))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-7:\
+          ( "File \"f.ml\", line 1, characters 4-9:\
\n'{li ...}' (list item) should not be empty."))) |}]


let empty_left_curly_brace =
@@ -3691,8 +3722,8 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 9)) (unordered heavy (())))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-6:\
-           \n'{- ...}' (list item) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 4-8:\
+           \n'{li ...}' (list item) should not be empty."))) |}]


let li_syntax_without_whitespace =
test "{ul {lifoo}}";
@@ -3702,9 +3733,7 @@ let%expect_test _ =
(((f.ml (1 0) (1 12))
(unordered heavy
((((f.ml (1 7) (1 10)) (paragraph (((f.ml (1 7) (1 10)) (word foo)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 4-7:\
-           \n'{li ...}' should be followed by space, a tab, or a new line."))) |}]
+         (warnings ())) |}]


let li_syntax_followed_by_newline =
test "{ul {li\nfoo}}";
@@ -3731,9 +3760,9 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (3 5))
+          (((f.ml (1 0) (4 5))
(unordered heavy
-             ((((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word foo)))))))))))
+             ((((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word foo)))))))))))
(warnings ())) |}]


let left_curly_brace_without_whitespace =
@@ -3751,11 +3780,17 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 21))
-            (unordered heavy
-             ((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo))))))
-              (((f.ml (1 16) (1 19)) (paragraph (((f.ml (1 16) (1 19)) (word bar)))))))))))
-         (warnings ())) |}]
+          (((f.ml (1 0) (1 15)) (unordered heavy ()))
+           ((f.ml (1 16) (1 19)) (paragraph (((f.ml (1 16) (1 19)) (word bar)))))
+           ((f.ml (1 19) (1 20)) (paragraph (((f.ml (1 19) (1 20)) (word })))))
+           ((f.ml (1 20) (1 21)) (paragraph (((f.ml (1 20) (1 21)) (word })))))))
+         (warnings
+          ( "File \"f.ml\", line 1, characters 0-15:\
+           \nIllegal character or syntax '{-' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 1, characters 19-20:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 1, characters 20-21:\
+           \n''}'': bad markup."))) |}]


let nested =
test "{ul {li {ul {li foo}}}}";
@@ -3779,9 +3814,10 @@ let%expect_test _ =
(unordered heavy
((((f.ml (1 8) (2 5))
(unordered light
-                 ((((f.ml (1 10) (1 13))
-                    (paragraph (((f.ml (1 10) (1 13)) (word foo))))))
-                  (((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))))))
+                 ((((f.ml (1 10) (2 0))
+                    (paragraph
+                     (((f.ml (1 10) (1 13)) (word foo)) ((f.ml (1 13) (2 0)) space))))
+                   ((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))))))
(warnings ())) |}]


let explicit_in_shorthand =
@@ -3802,26 +3838,24 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 4) (1 7)) (paragraph (((f.ml (1 4) (1 7)) (word foo)))))
-           ((f.ml (1 7) (1 8)) (paragraph (((f.ml (1 7) (1 8)) (word })))))))
+          (((f.ml (1 0) (1 8)) (paragraph (((f.ml (1 4) (1 7)) (word foo)))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-3:\
+          ( "File \"f.ml\", line 1, characters 0-8:\
\n'{li ...}' (list item) is not allowed in top-level text.\
-           \nSuggestion: move '{li ...}' into '{ul ...}' (bulleted list), or use '-' (bulleted list item)."
-            "File \"f.ml\", line 1, characters 7-8:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+           \nSuggestion: Move '{li ...}' (list item) into '{ol ...}' (numbered list) or '{ul ...}' (bulleted list)"))) |}]


let bare_left_curly_brace =
test "{- foo";
[%expect
{|
((output
-          (((f.ml (1 3) (1 6)) (paragraph (((f.ml (1 3) (1 6)) (word foo)))))))
+          (((f.ml (1 0) (1 6)) (paragraph (((f.ml (1 3) (1 6)) (word foo)))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-2:\
+          ( "File \"f.ml\", line 1, characters 0-6:\
+           \nOpen bracket ''{- ...}'' is never closed."
+            "File \"f.ml\", line 1, characters 0-6:\
\n'{- ...}' (list item) is not allowed in top-level text.\
-           \nSuggestion: move '{- ...}' into '{ul ...}' (bulleted list), or use '-' (bulleted list item)."))) |}]
+           \nSuggestion: Move '{- ...}' (list item) into '{ol ...}' (numbered list) or '{ul ...}' (bulleted list)"))) |}]


let after_code_block =
test "{[foo]} {ul {li bar}}";
@@ -3832,9 +3866,7 @@ let%expect_test _ =
((f.ml (1 8) (1 21))
(unordered heavy
((((f.ml (1 16) (1 19)) (paragraph (((f.ml (1 16) (1 19)) (word bar)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-11:\
-           \n'{ul ...}' (bulleted list) should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -3879,7 +3911,7 @@ let%expect_test _ =
(((f.ml (1 0) (1 15))
(@deprecated
((f.ml (1 12) (1 15)) (paragraph (((f.ml (1 12) (1 15)) (word foo)))))))
-           ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word bar)))))))
+           ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word bar)))))))
(warnings ())) |}]


let whitespace_only =
@@ -3913,7 +3945,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11)) (@deprecated))
-           ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word foo)))))))
+           ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word foo)))))))
(warnings ())) |}]


let extra_whitespace =
@@ -3931,9 +3963,11 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 15))
+          (((f.ml (1 0) (2 0))
(@deprecated
-             ((f.ml (1 12) (1 15)) (paragraph (((f.ml (1 12) (1 15)) (word foo)))))))
+             ((f.ml (1 12) (2 0))
+              (paragraph
+               (((f.ml (1 12) (1 15)) (word foo)) ((f.ml (1 15) (2 0)) space))))))
((f.ml (2 0) (2 15))
(@deprecated
((f.ml (2 12) (2 15)) (paragraph (((f.ml (2 12) (2 15)) (word bar)))))))))
@@ -3944,9 +3978,11 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 15))
+          (((f.ml (1 0) (2 0))
(@deprecated
-             ((f.ml (1 12) (1 15)) (paragraph (((f.ml (1 12) (1 15)) (word foo)))))))
+             ((f.ml (1 12) (2 0))
+              (paragraph
+               (((f.ml (1 12) (1 15)) (word foo)) ((f.ml (1 15) (2 0)) space))))))
((f.ml (2 0) (2 15))
(@deprecated
((f.ml (2 12) (2 15)) (paragraph (((f.ml (2 12) (2 15)) (word bar)))))))))
@@ -3957,40 +3993,34 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 31))
+          (((f.ml (1 0) (1 16))
(@deprecated
((f.ml (1 12) (1 16))
(paragraph
-               (((f.ml (1 12) (1 15)) (word foo)) ((f.ml (1 15) (1 16)) space))))
-             ((f.ml (1 16) (1 27))
-              (paragraph (((f.ml (1 16) (1 27)) (word @deprecated)))))
+               (((f.ml (1 12) (1 15)) (word foo)) ((f.ml (1 15) (1 16)) space))))))
+           ((f.ml (1 16) (1 31))
+            (@deprecated
((f.ml (1 28) (1 31)) (paragraph (((f.ml (1 28) (1 31)) (word bar)))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 16-27:\
-           \n'@deprecated' is not allowed in '@deprecated'.\
-           \nSuggestion: move '@deprecated' outside of any other markup."))) |}]
+         (warnings ())) |}]


let nested_in_self_at_start =
test "@deprecated @deprecated foo";
[%expect
{|
((output
-          (((f.ml (1 0) (1 27))
+          (((f.ml (1 0) (1 11)) (@deprecated))
+           ((f.ml (1 12) (1 27))
(@deprecated
-             ((f.ml (1 12) (1 23))
-              (paragraph (((f.ml (1 12) (1 23)) (word @deprecated)))))
((f.ml (1 24) (1 27)) (paragraph (((f.ml (1 24) (1 27)) (word foo)))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 12-23:\
-           \n'@deprecated' is not allowed in '@deprecated'.\
-           \nSuggestion: move '@deprecated' outside of any other markup."))) |}]
+         (warnings ())) |}]


let preceded_by_paragraph =
test "foo\n@deprecated";
[%expect
{|
((output
-          (((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
+          (((f.ml (1 0) (2 0))
+            (paragraph (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 0)) space))))
((f.ml (2 0) (2 11)) (@deprecated))))
(warnings ())) |}]


@@ -3999,9 +4029,11 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 5))
+          (((f.ml (1 0) (2 0))
(unordered light
-             ((((f.ml (1 2) (1 5)) (paragraph (((f.ml (1 2) (1 5)) (word foo)))))))))
+             ((((f.ml (1 2) (2 0))
+                (paragraph
+                 (((f.ml (1 2) (1 5)) (word foo)) ((f.ml (1 5) (2 0)) space))))))))
((f.ml (2 0) (2 11)) (@deprecated))))
(warnings ())) |}]


@@ -4016,7 +4048,9 @@ let%expect_test _ =
(unordered light
((((f.ml (1 14) (1 17))
(paragraph (((f.ml (1 14) (1 17)) (word foo)))))))))))))
-         (warnings ())) |}]
+         (warnings
+          ( "File \"f.ml\", line 1, characters 11-17:\
+           \n'-' (bulleted list item) should begin on its own line."))) |}]


let with_shorthand_list_double_item =
test "@deprecated - foo\n- bar";
@@ -4027,10 +4061,13 @@ let%expect_test _ =
(@deprecated
((f.ml (1 12) (2 5))
(unordered light
-               ((((f.ml (1 14) (1 17))
-                  (paragraph (((f.ml (1 14) (1 17)) (word foo))))))
-                (((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))))
-         (warnings ())) |}]
+               ((((f.ml (1 14) (2 0))
+                  (paragraph
+                   (((f.ml (1 14) (1 17)) (word foo)) ((f.ml (1 17) (2 0)) space))))
+                 ((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))))
+         (warnings
+          ( "File \"f.ml\", line 1, character 11 to line 2, character 0:\
+           \n'-' (bulleted list item) should begin on its own line."))) |}]


let double_implicitly_ended =
test "@deprecated - foo\n- bar\n\nNew paragraph";
@@ -4041,14 +4078,17 @@ let%expect_test _ =
(@deprecated
((f.ml (1 12) (2 5))
(unordered light
-               ((((f.ml (1 14) (1 17))
-                  (paragraph (((f.ml (1 14) (1 17)) (word foo))))))
-                (((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))
-           ((f.ml (4 0) (4 13))
+               ((((f.ml (1 14) (2 0))
+                  (paragraph
+                   (((f.ml (1 14) (1 17)) (word foo)) ((f.ml (1 17) (2 0)) space))))
+                 ((f.ml (2 2) (2 5)) (paragraph (((f.ml (2 2) (2 5)) (word bar)))))))))))
+           ((f.ml (5 0) (5 13))
(paragraph
-             (((f.ml (4 0) (4 3)) (word New)) ((f.ml (4 3) (4 4)) space)
-              ((f.ml (4 4) (4 13)) (word paragraph)))))))
-         (warnings ())) |}]
+             (((f.ml (5 0) (5 3)) (word New)) ((f.ml (5 3) (5 4)) space)
+              ((f.ml (5 4) (5 13)) (word paragraph)))))))
+         (warnings
+          ( "File \"f.ml\", line 1, character 11 to line 2, character 0:\
+           \n'-' (bulleted list item) should begin on its own line."))) |}]


let with_shorthand_list_after_newline =
test "@deprecated\n- foo";
@@ -4080,19 +4120,21 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) (code_block ((f.ml (1 2) (1 5)) foo)))
((f.ml (1 8) (1 19)) (@deprecated))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-19:\
-           \n'@deprecated' should begin on its own line."))) |}]
+         (warnings ())) |}]


let followed_by_section =
test "@deprecated foo\n{2 Bar}";
[%expect
{|
((output
-          (((f.ml (1 0) (1 15))
+          (((f.ml (1 0) (2 0))
(@deprecated
-             ((f.ml (1 12) (1 15)) (paragraph (((f.ml (1 12) (1 15)) (word foo)))))))
-           ((f.ml (2 0) (2 7)) (2 (label ()) (((f.ml (2 3) (2 6)) (word Bar)))))))
+             ((f.ml (1 12) (2 0))
+              (paragraph
+               (((f.ml (1 12) (1 15)) (word foo)) ((f.ml (1 15) (2 0)) space))))))
+           ((f.ml (2 0) (2 7))
+            (2 (label ())
+             (((f.ml (2 2) (2 3)) space) ((f.ml (2 3) (2 6)) (word Bar)))))))
(warnings ())) |}]
end in
()
@@ -4178,7 +4220,7 @@ let%expect_test _ =
(((f.ml (1 0) (1 14))
(@param foo
((f.ml (1 11) (1 14)) (paragraph (((f.ml (1 11) (1 14)) (word bar)))))))
-           ((f.ml (3 0) (3 3)) (paragraph (((f.ml (3 0) (3 3)) (word baz)))))))
+           ((f.ml (4 0) (4 3)) (paragraph (((f.ml (4 0) (4 3)) (word baz)))))))
(warnings ())) |}]


let two =
@@ -4194,23 +4236,16 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 21))
-            (@param foo
-             ((f.ml (1 11) (1 21))
-              (paragraph
-               (((f.ml (1 11) (1 21)) (word @param)) ((f.ml (1 11) (1 21)) space)
-                ((f.ml (1 11) (1 21)) (word bar)))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 11-21:\
-           \n'@param' is not allowed in '@param'.\
-           \nSuggestion: move '@param' outside of any other markup."))) |}]
+          (((f.ml (1 0) (1 10)) (@param foo)) ((f.ml (1 11) (1 21)) (@param bar))))
+         (warnings ())) |}]


let preceded_by_paragraph =
test "foo\n@param bar";
[%expect
{|
((output
-          (((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
+          (((f.ml (1 0) (2 0))
+            (paragraph (((f.ml (1 0) (1 3)) (word foo)) ((f.ml (1 3) (2 0)) space))))
((f.ml (2 0) (2 10)) (@param bar))))
(warnings ())) |}]


@@ -4231,9 +4266,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) (code_block ((f.ml (1 2) (1 5)) foo)))
((f.ml (1 8) (1 18)) (@param foo))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-18:\
-           \n'@param' should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -4408,9 +4441,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) (code_block ((f.ml (1 2) (1 5)) foo)))
((f.ml (1 8) (1 18)) (@see url foo))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-18:\
-           \n'@see' should begin on its own line."))) |}]
+         (warnings ())) |}]


let url_attempted_nested_closer =
test "@see <foo>bar>";
@@ -4456,10 +4487,7 @@ let%expect_test _ =
test "@since";
[%expect
{|
-        ((output (((f.ml (1 0) (1 6)) (@since ""))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-6:\
-           \n'@since' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 6)) (@since "")))) (warnings ())) |}]


let prefix =
test "@sincefoo";
@@ -4490,10 +4518,7 @@ let%expect_test _ =
test "@since";
[%expect
{|
-        ((output (((f.ml (1 0) (1 6)) (@since ""))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-6:\
-           \n'@since' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 6)) (@since "")))) (warnings ())) |}]
end in
()


@@ -4550,10 +4575,7 @@ let%expect_test _ =
test "@version";
[%expect
{|
-        ((output (((f.ml (1 0) (1 8)) (@version ""))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-8:\
-           \n'@version' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 8)) (@version "")))) (warnings ())) |}]


let prefix =
test "@versionfoo";
@@ -4585,10 +4607,7 @@ let%expect_test _ =
test "@version";
[%expect
{|
-        ((output (((f.ml (1 0) (1 8)) (@version ""))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-8:\
-           \n'@version' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 8)) (@version "")))) (warnings ())) |}]
end in
()


@@ -4598,32 +4617,28 @@ let%expect_test _ =
test "@canonical Foo";
[%expect
{|
-        ((output (((f.ml (1 0) (1 14)) (@canonical ((f.ml (1 11) (1 14)) Foo)))))
+        ((output (((f.ml (1 0) (1 14)) (@canonical ((f.ml (1 0) (1 14)) Foo)))))
(warnings ())) |}]


let empty =
test "@canonical";
[%expect
{|
-        ((output (((f.ml (1 0) (1 10)) (@canonical ((f.ml (1 11) (1 10)) "")))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-10:\
-           \n'@canonical' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 10)) (@canonical ((f.ml (1 0) (1 10)) "")))))
+         (warnings ())) |}]


let whitespace_only =
test "@canonical";
[%expect
{|
-        ((output (((f.ml (1 0) (1 10)) (@canonical ((f.ml (1 11) (1 10)) "")))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-10:\
-           \n'@canonical' should not be empty."))) |}]
+        ((output (((f.ml (1 0) (1 10)) (@canonical ((f.ml (1 0) (1 10)) "")))))
+         (warnings ())) |}]


let extra_whitespace =
test "@canonical  Foo";
[%expect
{|
-        ((output (((f.ml (1 0) (1 15)) (@canonical ((f.ml (1 11) (1 15)) Foo)))))
+        ((output (((f.ml (1 0) (1 15)) (@canonical ((f.ml (1 0) (1 15)) Foo)))))
(warnings ())) |}]


let prefix =
@@ -4644,7 +4659,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (1 18)) (@canonical ((f.ml (1 11) (1 18)) "Foo Bar")))))
+          (((f.ml (1 0) (1 18)) (@canonical ((f.ml (1 0) (1 18)) "Foo Bar")))))
(warnings ())) |}]
end in
()
@@ -4677,9 +4692,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) @inline)
((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-11:\
-           \nParagraph should begin on its own line."))) |}]
+         (warnings ())) |}]


let followed_by_paragraph =
test "@inline\nfoo";
@@ -4706,9 +4719,7 @@ let%expect_test _ =
((f.ml (1 8) (1 13))
(unordered light
((((f.ml (1 10) (1 13)) (paragraph (((f.ml (1 10) (1 13)) (word foo)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-9:\
-           \n'-' (bulleted list item) should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -4739,9 +4750,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 5)) @open)
((f.ml (1 6) (1 9)) (paragraph (((f.ml (1 6) (1 9)) (word foo)))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 6-9:\
-           \nParagraph should begin on its own line."))) |}]
+         (warnings ())) |}]


let followed_by_paragraph =
test "@open\nfoo";
@@ -4768,9 +4777,7 @@ let%expect_test _ =
((f.ml (1 6) (1 11))
(unordered light
((((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 6-7:\
-           \n'-' (bulleted list item) should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -4802,9 +4809,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) @closed)
((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-11:\
-           \nParagraph should begin on its own line."))) |}]
+         (warnings ())) |}]


let followed_by_paragraph =
test "@closed\nfoo";
@@ -4831,9 +4836,7 @@ let%expect_test _ =
((f.ml (1 8) (1 13))
(unordered light
((((f.ml (1 10) (1 13)) (paragraph (((f.ml (1 10) (1 13)) (word foo)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-9:\
-           \n'-' (bulleted list item) should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -4865,9 +4868,7 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 7)) @hidden)
((f.ml (1 8) (1 11)) (paragraph (((f.ml (1 8) (1 11)) (word foo)))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-11:\
-           \nParagraph should begin on its own line."))) |}]
+         (warnings ())) |}]


let followed_by_paragraph =
test "@hidden\nfoo";
@@ -4894,9 +4895,7 @@ let%expect_test _ =
((f.ml (1 8) (1 13))
(unordered light
((((f.ml (1 10) (1 13)) (paragraph (((f.ml (1 10) (1 13)) (word foo)))))))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 8-9:\
-           \n'-' (bulleted list item) should begin on its own line."))) |}]
+         (warnings ())) |}]
end in
()


@@ -4945,12 +4944,11 @@ let%expect_test _ =
(((f.ml (1 0) (1 1)) (paragraph (((f.ml (1 0) (1 1)) (word {)))))
((f.ml (1 1) (1 2)) (paragraph (((f.ml (1 1) (1 2)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-1:\
+          ( "File \"f.ml\", line 1, characters 1-2:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 1, characters 0-1:\
\n'{': bad markup.\
-           \nSuggestion: escape the brace with '\\{'."
-            "File \"f.ml\", line 1, characters 1-2:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+           \nSuggestion: escape the brace with '\\{'."))) |}]


let left_space =
test "{ foo}";
@@ -5001,10 +4999,8 @@ let%expect_test _ =
[%expect
{|
((output (((f.ml (1 0) (1 1)) (paragraph (((f.ml (1 0) (1 1)) (word })))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 0-1:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+         (warnings ( "File \"f.ml\", line 1, characters 0-1:\
+                    \n''}'': bad markup."))) |}]


let right_brace_in_paragraph =
test "foo}";
@@ -5013,10 +5009,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
((f.ml (1 3) (1 4)) (paragraph (((f.ml (1 3) (1 4)) (word })))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 3-4:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+         (warnings ( "File \"f.ml\", line 1, characters 3-4:\
+                    \n''}'': bad markup."))) |}]


let multiple_right_brace =
test "foo } bar } baz";
@@ -5024,17 +5018,15 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 3)) (paragraph (((f.ml (1 0) (1 3)) (word foo)))))
-           ((f.ml (1 4) (1 5)) (paragraph (((f.ml (1 4) (1 5)) (word })))))
+           ((f.ml (1 3) (1 5)) (paragraph (((f.ml (1 3) (1 5)) (word })))))
((f.ml (1 6) (1 9)) (paragraph (((f.ml (1 6) (1 9)) (word bar)))))
-           ((f.ml (1 10) (1 11)) (paragraph (((f.ml (1 10) (1 11)) (word })))))
+           ((f.ml (1 9) (1 11)) (paragraph (((f.ml (1 9) (1 11)) (word })))))
((f.ml (1 12) (1 15)) (paragraph (((f.ml (1 12) (1 15)) (word baz)))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-5:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."
-            "File \"f.ml\", line 1, characters 10-11:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+          ( "File \"f.ml\", line 1, characters 3-5:\
+           \n''}'': bad markup."
+            "File \"f.ml\", line 1, characters 9-11:\
+           \n''}'': bad markup."))) |}]


let right_brace_in_list_item =
test "- foo}";
@@ -5045,10 +5037,8 @@ let%expect_test _ =
(unordered light
((((f.ml (1 2) (1 5)) (paragraph (((f.ml (1 2) (1 5)) (word foo)))))))))
((f.ml (1 5) (1 6)) (paragraph (((f.ml (1 5) (1 6)) (word })))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 5-6:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+         (warnings ( "File \"f.ml\", line 1, characters 5-6:\
+                    \n''}'': bad markup."))) |}]


let right_brace_in_code_span =
test "[foo}]";
@@ -5081,11 +5071,10 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 11)) (@deprecated))
-           ((f.ml (1 12) (1 13)) (paragraph (((f.ml (1 12) (1 13)) (word })))))))
+           ((f.ml (1 11) (1 13)) (paragraph (((f.ml (1 11) (1 13)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 12-13:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+          ( "File \"f.ml\", line 1, characters 11-13:\
+           \n''}'': bad markup."))) |}]


let right_bracket =
test "]";
@@ -5142,14 +5131,12 @@ let%expect_test _ =
test "{b]}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 2)) (paragraph (((f.ml (1 0) (1 2)) (bold ())))))))
+        ((output (((f.ml (1 0) (1 4)) (paragraph (((f.ml (1 0) (1 4)) (bold ())))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b' should be followed by space, a tab, or a new line."
-            "File \"f.ml\", line 1, characters 2-4:\
-           \n']}' is not allowed in '{b ...}' (boldface text)."
-            "File \"f.ml\", line 1, characters 0-2:\
-           \n'{b ...}' (boldface text) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-4:\
+           \n'{b ...}' (boldface text) should not be empty."
+            "File \"f.ml\", line 1, characters 0-4:\
+           \n']}' is not allowed in '{b ...}' (boldface text)."))) |}]


let right_bracket_in_verbatim =
test "{v ] v}";
@@ -5162,37 +5149,30 @@ let%expect_test _ =
{|
((output (((f.ml (1 0) (1 6)) (unordered heavy ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-6:\
-           \n']}' is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: move ']}' into a list item, '{li ...}' or '{- ...}'."
-            "File \"f.ml\", line 1, characters 6-6:\
-           \nEnd of text is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: add '}'."
-            "File \"f.ml\", line 1, characters 0-3:\
-           \n'{ul ...}' (bulleted list) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-6:\
+           \nIllegal character or syntax ']}' in '{ul ...}' (bulleted list)"))) |}]


let right_bracket_in_list_item =
test "{ul {li ]}}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 11)) (unordered heavy (())))))
+        ((output
+          (((f.ml (1 0) (1 10)) (unordered heavy ()))
+           ((f.ml (1 10) (1 11)) (paragraph (((f.ml (1 10) (1 11)) (word })))))))
(warnings
-          ( "File \"f.ml\", line 1, characters 4-7:\
-           \n'{li ...}' (list item) should not be empty."
-            "File \"f.ml\", line 1, characters 11-11:\
-           \nEnd of text is not allowed in '{ul ...}' (bulleted list).\
-           \nSuggestion: add '}'."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-10:\
+           \nIllegal character or syntax ']}' in '{ul ...}' (bulleted list)"
+            "File \"f.ml\", line 1, characters 10-11:\
+           \n''}'': bad markup."))) |}]


let right_bracket_in_heading =
test "{2 ]}";
[%expect
{|
-        ((output (((f.ml (1 0) (1 2)) (2 (label ()) ()))))
+        ((output (((f.ml (1 0) (1 5)) (2 (label ()) ()))))
(warnings
-          ( "File \"f.ml\", line 1, characters 3-5:\
-           \n']}' is not allowed in '{2 ...}' (section heading)."
-            "File \"f.ml\", line 1, characters 0-2:\
-           \n'{2 ...}' (section heading) should not be empty."))) |}]
+          ( "File \"f.ml\", line 1, characters 0-5:\
+           \nIllegal character or syntax '{2 ]}' in '{2 ...}' (section heading)"))) |}]


let right_bracket_in_author =
test "@author Foo]";
@@ -5257,8 +5237,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (2 3))
(paragraph
-             (((f.ml (1 0) (1 2)) (word "\206\187")) ((f.ml (1 2) (2 1)) space)
-              ((f.ml (2 1) (2 3)) (word "\206\187")))))))
+             (((f.ml (1 0) (1 2)) (word "\206\187")) ((f.ml (1 2) (2 0)) space)
+              ((f.ml (2 0) (2 1)) space) ((f.ml (2 1) (2 3)) (word "\206\187")))))))
(warnings ())) |}]


let paragraphs =
@@ -5267,7 +5247,7 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 2)) (paragraph (((f.ml (1 0) (1 2)) (word "\206\187")))))
-           ((f.ml (3 1) (3 3)) (paragraph (((f.ml (3 1) (3 3)) (word "\206\187")))))))
+           ((f.ml (4 1) (4 3)) (paragraph (((f.ml (4 1) (4 3)) (word "\206\187")))))))
(warnings ())) |}]


let code_span =
@@ -5337,7 +5317,8 @@ let%expect_test _ =
{|
((output
(((f.ml (1 0) (1 10))
-            (2 (label ("\206\187")) (((f.ml (1 6) (1 9)) (word Bar)))))))
+            (2 (label ("\206\187"))
+             (((f.ml (1 5) (1 6)) space) ((f.ml (1 6) (1 9)) (word Bar)))))))
(warnings ())) |}]


let author =
@@ -5382,10 +5363,8 @@ let%expect_test _ =
((output
(((f.ml (1 0) (1 2)) (paragraph (((f.ml (1 0) (1 2)) (word "\206\187")))))
((f.ml (1 2) (1 3)) (paragraph (((f.ml (1 2) (1 3)) (word })))))))
-         (warnings
-          ( "File \"f.ml\", line 1, characters 2-3:\
-           \nUnpaired '}' (end of markup).\
-           \nSuggestion: try '\\}'."))) |}]
+         (warnings ( "File \"f.ml\", line 1, characters 2-3:\
+                    \n''}'': bad markup."))) |}]
end in
()


@@ -5561,6 +5540,10 @@ let%expect_test _ =
(end_loc (1 3)) (value (word one)))
((start ((pos_fname none) (pos_bol 0) (pos_lnum 1) (pos_cnum 3)))
(start_loc (1 3))
+                (end ((pos_fname none) (pos_bol 4) (pos_lnum 2) (pos_cnum 4)))
+                (end_loc (2 0)) (value space))
+               ((start ((pos_fname none) (pos_bol 4) (pos_lnum 2) (pos_cnum 4)))
+                (start_loc (2 0))
(end ((pos_fname none) (pos_bol 4) (pos_lnum 2) (pos_cnum 5)))
(end_loc (2 1)) (value space))
((start ((pos_fname none) (pos_bol 4) (pos_lnum 2) (pos_cnum 5)))
@@ -5569,6 +5552,10 @@ let%expect_test _ =
(end_loc (2 4)) (value (word two)))
((start ((pos_fname none) (pos_bol 4) (pos_lnum 2) (pos_cnum 8)))
(start_loc (2 4))
+                (end ((pos_fname none) (pos_bol 9) (pos_lnum 3) (pos_cnum 9)))
+                (end_loc (3 0)) (value space))
+               ((start ((pos_fname none) (pos_bol 9) (pos_lnum 3) (pos_cnum 9)))
+                (start_loc (3 0))
(end ((pos_fname none) (pos_bol 9) (pos_lnum 3) (pos_cnum 11)))
(end_loc (3 2)) (value space))
((start ((pos_fname none) (pos_bol 9) (pos_lnum 3) (pos_cnum 11)))
@@ -5598,6 +5585,10 @@ let%expect_test _ =
(end_loc (2 13)) (value (word one)))
((start ((pos_fname none) (pos_bol 10) (pos_lnum 2) (pos_cnum 23)))
(start_loc (2 13))
+                  (end ((pos_fname none) (pos_bol 24) (pos_lnum 3) (pos_cnum 24)))
+                  (end_loc (3 0)) (value space))
+                 ((start ((pos_fname none) (pos_bol 24) (pos_lnum 3) (pos_cnum 24)))
+                  (start_loc (3 0))
(end ((pos_fname none) (pos_bol 24) (pos_lnum 3) (pos_cnum 25)))
(end_loc (3 1)) (value space))
((start ((pos_fname none) (pos_bol 24) (pos_lnum 3) (pos_cnum 25)))
@@ -5606,6 +5597,10 @@ let%expect_test _ =
(end_loc (3 4)) (value (word two)))
((start ((pos_fname none) (pos_bol 24) (pos_lnum 3) (pos_cnum 28)))
(start_loc (3 4))
+                  (end ((pos_fname none) (pos_bol 29) (pos_lnum 4) (pos_cnum 29)))
+                  (end_loc (4 0)) (value space))
+                 ((start ((pos_fname none) (pos_bol 29) (pos_lnum 4) (pos_cnum 29)))
+                  (start_loc (4 0))
(end ((pos_fname none) (pos_bol 29) (pos_lnum 4) (pos_cnum 31)))
(end_loc (4 2)) (value space))
((start ((pos_fname none) (pos_bol 29) (pos_lnum 4) (pos_cnum 31)))
@@ -5639,7 +5634,7 @@ let%expect_test _ =
[%expect
{|
((output
-          (((f.ml (1 0) (9 7))
+          (((f.ml (1 0) (8 7))
(math_block
"      \\alpha(x)=\\left\\{\
\n                \\begin{array}{ll}                 % beginning of the array\
File "test/model/semantics/test.ml", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/model/semantics/test.ml _build/.sandbox/2b2124c6bbabaf85744d4c642c2970de/default/test/model/semantics/test.ml.corrected
diff --git a/_build/default/test/model/semantics/test.ml b/_build/.sandbox/2b2124c6bbabaf85744d4c642c2970de/default/test/model/semantics/test.ml.corrected
index 26ddd6c..892bc1e 100644
--- a/_build/default/test/model/semantics/test.ml
+++ b/_build/.sandbox/2b2124c6bbabaf85744d4c642c2970de/default/test/model/semantics/test.ml.corrected
@@ -284,7 +284,7 @@ let%expect_test _ =
test "{%\n:foo%}";
[%expect
{|
-        {"value":[{"`Paragraph":[{"`Code_span":"foo"}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml\", line 1, character 0 to line 2, character 6:\n'{%\n:': bad raw markup target.\nSuggestion: try '{%html:...%}'."]} |}]
+        {"value":[{"`Paragraph":[{"`Code_span":"foo"}]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml\", line 1, characters 0-9:\n'{%\n:': bad raw markup target.\nSuggestion: try '{%html:...%}'."]} |}]


let percent_in_target =
test "{%%:%}";
@@ -360,19 +360,19 @@ let%expect_test _ =
test "{0 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let titles_no_high_levels =
test "{6 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]


let two_titles =
test "{0 Foo}\n{0 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'."]} |}]


let no_heading =
test "foo";
@@ -384,67 +384,67 @@ let%expect_test _ =
test "foo\n{0 Bar}";
[%expect
{|
-        {"value":[{"`Paragraph":[{"`Word":"foo"}]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let two_top_level_section_headings =
test "{1 Foo}\n{1 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '1'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '1'."]} |}]


let two_headings_second_higher =
test "{1 Foo}\n{0 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '1'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '1'."]} |}]


let three_headings_last_two_higher =
test "{3 Foo}\n{1 Bar}\n{2 Baz}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"baz"]},[{"`Word":"Baz"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '3'.","File \"f.ml\", line 3, characters 0-7:\n'{2': heading level should be lower than top heading level '3'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-baz"]},["`Space",{"`Word":"Baz"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '3'.","File \"f.ml\", line 3, characters 0-7:\n'{2': heading level should be lower than top heading level '3'."]} |}]


let none =
test "{1 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let title_no_titles_allowed =
test "{0 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let two_titles_none_allowed =
test "{0 Foo}\n{0 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'."]} |}]


let two_headings_none_allowed =
test "{1 Foo}\n{1 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '1'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Section","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{1': heading level should be lower than top heading level '1'."]} |}]


let multiple_with_bad_section =
test "{0 Foo}\n{0 Foo}\n{6 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'.","File \"f.ml\", line 3, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{0': heading level should be lower than top heading level '0'.","File \"f.ml\", line 3, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]


let promoted_duplicates =
test "{6 Foo}\n{6 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed).","File \"f.ml\", line 2, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed).","File \"f.ml\", line 2, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]


let section_promoted_to_duplicate =
test "{5 Foo}\n{6 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
end in
()


@@ -454,259 +454,259 @@ let%expect_test _ =
test "{2 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let subsection =
test "{3 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let subsubsection =
test "{4 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Paragraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Paragraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let leading_whitespace =
test "{2  Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let no_leading_whitespace =
test "{2Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-2:\n'{2' should be followed by space, a tab, or a new line."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]


let no_leading_whitespace_h3 =
test "{3Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-2:\n'{3' should be followed by space, a tab, or a new line."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.m"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]


let leading_newline =
test "{2\nFoo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let leading_cr_lf =
test "{2\r\nFoo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let leading_blank_line =
test "{2\n\nFoo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"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"]},""]},[]]},{"`Paragraph":[{"`Word":"Foo"}]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, character 0 to line 4, character 0:\nIllegal character or syntax '{2\n\n' in '{2 ...}' (section heading)","File \"f.ml\", line 4, characters 3-4:\n''}'': bad markup."]} |}]


let leading_blank_line_h3 =
test "{3\n\nFoo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-0:\nBlank line is not allowed in '{3 ...}' (section heading)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[]]},{"`Paragraph":[{"`Word":"Foo"}]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, character 0 to line 4, character 0:\nIllegal character or syntax '{3\n\n' in '{3 ...}' (section heading)","File \"f.ml\", line 4, characters 3-4:\n''}'': bad markup."]} |}]


let trailing_whitespace =
test "{2 Foo }";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let trailing_newline =
test "{2 Foo\n}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let trailing_blank_line =
test "{2 Foo\n\n}";
[%expect
{|
-        {"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"]},""]},[]]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, character 0 to line 4, character 0:\nIllegal character or syntax '{2 Foo\n\n' in '{2 ...}' (section heading)","File \"f.ml\", line 4, characters 0-1:\n''}'': bad markup."]} |}]


let nested_markup =
test "{2 [foo]}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Code_span":"foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Code_span":"foo"}]]}],"warnings":[]} |}]


let nested_code_with_uppercase =
test "{2 [Foo]}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Code_span":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Code_span":"Foo"}]]}],"warnings":[]} |}]


let nested_code_with_spaces =
test "{2 [ foo bar  baz  \t]}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo-bar--baz---"]},[{"`Code_span":" foo bar  baz  \t"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"--foo-bar--baz---"]},["`Space",{"`Code_span":" foo bar  baz  \t"}]]}],"warnings":[]} |}]


let nested_code_with_newline =
test "{2 [foo\nbar\r\nbaz]}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo-bar-baz"]},[{"`Code_span":"foo bar baz"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo-bar-baz"]},["`Space",{"`Code_span":"foo bar baz"}]]}],"warnings":[]} |}]


let nested_style =
test "{2 {e foo bar}}";
[%expect
{|
-        {"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"]},["`Space",{"`Styled":["`Emphasis",[{"`Word":"foo"},"`Space",{"`Word":"bar"}]]}]]}],"warnings":[]} |}]


let words =
test "{2 foo bar}";
[%expect
{|
-        {"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"]},["`Space",{"`Word":"foo"},"`Space",{"`Word":"bar"}]]}],"warnings":[]} |}]


let nested_heading =
test "{2 {2 Foo}}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, characters 3-5:\n'{2 ...}' (section heading) is not allowed in '{2 ...}' (section heading).","File \"f.ml\", line 1, characters 0-2:\n'{2 ...}' (section heading) should not be empty.","File \"f.ml\", line 1, characters 3-5:\n'{2 ...}' (section heading) should begin on its own line.","File \"f.ml\", line 1, characters 10-11:\nUnpaired '}' (end of markup).\nSuggestion: try '\\}'.","File \"f.ml\", line 1, characters 3-10:\n'{2': heading level should be lower than top heading level '2'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[]]},{"`Paragraph":[{"`Word":"Foo"}]},{"`Paragraph":[{"`Word":"}"}]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, characters 0-5:\nIllegal character or syntax '{2 {2' in '{2 ...}' (section heading)","File \"f.ml\", line 1, characters 9-10:\n''}'': bad markup.","File \"f.ml\", line 1, characters 10-11:\n''}'': bad markup."]} |}]


let in_list =
test "- {2 Foo}";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"Foo"}]}]]]}],"warnings":["File \"f.ml\", line 1, characters 2-4:\n'{2 ...}' (section heading) is not allowed in '-' (bulleted list item).\nSuggestion: move '{2' 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":"}"}]}],"warnings":["File \"f.ml\", line 1, characters 0-4:\nIllegal character or syntax '{2' in '-' (bulleted list item)","File \"f.ml\", line 1, characters 8-9:\n''}'': bad markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let followed_by_junk =
test "{2 Foo} bar";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Paragraph":[{"`Word":"bar"}]}],"warnings":["File \"f.ml\", line 1, characters 8-11:\nParagraph should begin on its own line."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Paragraph":[{"`Word":"bar"}]}],"warnings":[]} |}]


let preceded_by_junk =
test "foo {2 Bar}";
[%expect
{|
-        {"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"},"`Space"]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let followed_by_block =
test "{2 Foo}\nbar";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Paragraph":[{"`Word":"bar"}]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Paragraph":[{"`Word":"bar"}]}],"warnings":[]} |}]


let preceded_by_block =
test "foo\n{2 Bar}";
[%expect
{|
-        {"value":[{"`Paragraph":[{"`Word":"foo"}]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`Paragraph":[{"`Word":"foo"},"`Space"]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let label =
test "{2:foo Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Bar"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},["`Space",{"`Word":"Bar"}]]}],"warnings":[]} |}]


let whitespace_before_colon =
test "{2 :foo Bar}";
[%expect
{|
-        {"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"]},["`Space",{"`Word":":foo"},"`Space",{"`Word":"Bar"}]]}],"warnings":[]} |}]


let whitespace_after_colon =
test "{2: foo Bar}";
[%expect
{|
-        {"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":"true"},{"`Label":[{"`Page":["None","f.ml"]},""]},["`Space",{"`Word":"foo"},"`Space",{"`Word":"Bar"}]]}],"warnings":[]} |}]


let label_only =
test "{2:foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[]]}],"warnings":["File \"f.ml\", line 1, characters 0-6:\n'{2 ...}' (section heading) should not be empty."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'{2 ...}' (section heading) should not be empty."]} |}]


let label_only_with_whitespace =
test "{2:foo }";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[]]}],"warnings":["File \"f.ml\", line 1, characters 0-6:\n'{2 ...}' (section heading) should not be empty."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[]]}],"warnings":["File \"f.ml\", line 1, characters 0-8:\n'{2 ...}' (section heading) should not be empty."]} |}]


let in_list_outside_item =
test "{ul {2 Foo}}";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[]]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, characters 4-6:\n'{2 ...}' (section heading) is not allowed in '{ul ...}' (bulleted list).\nSuggestion: move '{2 ...}' (section heading) outside the list.","File \"f.ml\", line 1, characters 7-10:\n'Foo' is not allowed in '{ul ...}' (bulleted list).\nSuggestion: move 'Foo' into a list item, '{li ...}' or '{- ...}'.","File \"f.ml\", line 1, characters 0-3:\n'{ul ...}' (bulleted list) should not be empty.","File \"f.ml\", line 1, characters 11-12:\nUnpaired '}' (end of markup).\nSuggestion: try '\\}'.","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":[{"`List":["`Unordered",[]]},{"`Paragraph":[{"`Word":"Foo"}]},{"`Paragraph":[{"`Word":"}"}]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, characters 0-6:\nIllegal character or syntax '{2' in '{ul ...}' (bulleted list)","File \"f.ml\", line 1, characters 10-11:\n''}'': bad markup.","File \"f.ml\", line 1, characters 11-12:\n''}'': bad markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let preceded_by_shorthand_list =
test "- foo\n{2 Bar}";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]}]]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"},"`Space"]}]]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let nested_in_two_lists =
test "{ul {li - foo\n{2 Bar}}}";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]}]]]},{"`Paragraph":[{"`Word":"Bar"}]}]]]}],"warnings":["File \"f.ml\", line 2, characters 0-2:\n'{2 ...}' (section heading) is not allowed in '{li ...}' (list item).\nSuggestion: move '{2' outside of any other markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`List":["`Unordered",[]]},{"`Paragraph":[{"`Word":"Bar"}]},{"`Paragraph":[{"`Word":"}"}]},{"`Paragraph":[{"`Word":"}"}]},{"`Paragraph":[{"`Word":"}"}]}],"warnings":["File \"f.ml\", line 1, character 0 to line 2, character 2:\nIllegal character or syntax '{2' in '{ul ...}' (bulleted list)","File \"f.ml\", line 2, characters 6-7:\n''}'': bad markup.","File \"f.ml\", line 2, characters 7-8:\n''}'': bad markup.","File \"f.ml\", line 2, characters 8-9:\n''}'': bad markup.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let bad_level_long_number =
test "{22 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-8:\n'22': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-8:\n'22': bad heading level (0-5 allowed)."]} |}]


let bad_level_long_number_with_label =
test "{22:foo Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-12:\n'22': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-12:\n'22': bad heading level (0-5 allowed)."]} |}]


let bad_level_leading_zero =
test "{02 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 1-3:\n'02': leading zero in heading level."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 1-3:\n'02': leading zero in heading level."]} |}]


let bad_level_leading_zero_with_label =
test "{02:foo Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 1-7:\n'02': leading zero in heading level."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"true"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 1, characters 1-7:\n'02': leading zero in heading level."]} |}]


let bad_level_title =
test "{0 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Title","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":[]} |}]


let bad_level_too_deep =
test "{6 Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subparagraph","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'6': bad heading level (0-5 allowed)."]} |}]


let link_in_markup =
test "{2 {{:foo}}}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[{"`Link":["foo",[]]}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-"]},["`Space",{"`Link":["foo",[]]}]]}],"warnings":["File \"f.ml\", line 1, characters 3-11:\n'{{:...} ...}' (external link) should not be empty."]} |}]


let reference_in_markup =
test "{2 {!foo}}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-"]},["`Space",{"`Reference":[{"`Root":["foo","`TUnknown"]},[]]}]]}],"warnings":[]} |}]


let two =
test "{2 Foo}\n{2 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{2': heading level should be lower than top heading level '2'."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml\", line 2, characters 0-7:\n'{2': heading level should be lower than top heading level '2'."]} |}]


let greater =
test "{2 Foo}\n{3 Bar}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":[]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-foo"]},["`Space",{"`Word":"Foo"}]]},{"`Heading":[{"heading_level":"`Subsubsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":[]} |}]
end in
()


@@ -722,13 +722,13 @@ let%expect_test _ =
test "@author";
[%expect
{|
-        {"value":[{"`Tag":{"`Author":""}}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'@author' should not be empty.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`Paragraph":[{"`Word":"@author"}]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\nUnknown tag '@author'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let whitespace_only =
test "@author";
[%expect
{|
-        {"value":[{"`Tag":{"`Author":""}}],"warnings":["File \"f.ml\", line 1, characters 0-7:\n'@author' should not be empty.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`Paragraph":[{"`Word":"@author"}]}],"warnings":["File \"f.ml\", line 1, characters 0-7:\nUnknown tag '@author'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let extra_whitespace =
test "@author  Foo Bar";
@@ -800,7 +800,7 @@ let%expect_test _ =
test "@author Foo\n{2 Bar}";
[%expect
{|
-        {"value":[{"`Tag":{"`Author":"Foo"}},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"bar"]},[{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`Tag":{"`Author":"Foo"}},{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"-bar"]},["`Space",{"`Word":"Bar"}]]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let followed_by_author =
test "@author Foo\n@author Bar";
@@ -830,7 +830,7 @@ let%expect_test _ =
test "foo\n@author Bar";
[%expect
{|
-        {"value":[{"`Paragraph":[{"`Word":"foo"}]},{"`Tag":{"`Author":"Bar"}}],"warnings":["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"},"`Space"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let no_markup =
test "@author Foo [Bar]";
@@ -842,7 +842,7 @@ let%expect_test _ =
test "foo @author Bar";
[%expect
{|
-        {"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"},"`Space"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_code =
test "[@author Foo]";
@@ -854,55 +854,55 @@ let%expect_test _ =
test "{b @author Foo}";
[%expect
{|
-        {"value":[{"`Paragraph":[{"`Styled":["`Bold",[]]}]},{"`Tag":{"`Author":"Foo}"}}],"warnings":["File \"f.ml\", line 1, characters 3-15:\n'@author' is not allowed in '{b ...}' (boldface text).","File \"f.ml\", line 1, characters 0-2:\n'{b ...}' (boldface text) should not be empty.","File \"f.ml\", line 1, characters 3-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":[{"`Styled":["`Bold",[]]}]}],"warnings":["File \"f.ml\", line 1, characters 0-15:\nIllegal character or syntax '@author Foo}' in '{b ...}' (boldface text)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_heading =
test "{2 @author Foo}";
[%expect
{|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[]]},{"`Tag":{"`Author":"Foo}"}}],"warnings":["File \"f.ml\", line 1, characters 3-15:\n'@author' is not allowed in '{2 ...}' (section heading).","File \"f.ml\", line 1, characters 0-2:\n'{2 ...}' (section heading) should not be empty.","File \"f.ml\", line 1, characters 3-15:\n'@author' should begin on its own line."]} |}]
+        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},""]},[]]}],"warnings":["File \"f.ml\", line 1, characters 0-15:\nIllegal character or syntax '{2 @author Foo}' in '{2 ...}' (section heading)"]} |}]


let after_shorthand_list =
test "- foo\n@author Bar";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]}]]]},{"`Tag":{"`Author":"Bar"}}],"warnings":["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":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"},"`Space"]}]]]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_shorthand_list =
test "- foo @author Bar";
[%expect
{|
-        {"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"},"`Space"]}]]]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_shorthand_list_at_start =
test "- @author Foo";
[%expect
{|
-        {"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",[]]}],"warnings":["File \"f.ml\", line 1, characters 0-13:\nIllegal character or syntax '@author Foo' in '-' (bulleted list item)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_list_item =
test "{ul {li foo @author Bar}}";
[%expect
{|
-        {"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",[]]}],"warnings":["File \"f.ml\", line 1, characters 0-25:\nIllegal character or syntax '@author Bar}}' in '{ul ...}' (bulleted list)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_list_item_at_start =
test "{ul {li @author Foo}}";
[%expect
{|
-        {"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",[]]}],"warnings":["File \"f.ml\", line 1, characters 0-21:\nIllegal character or syntax '@author Foo}}' in '{ul ...}' (bulleted list)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_list_item_on_new_line =
test "{ul {li foo\n@author Bar}}";
[%expect
{|
-        {"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",[]]}],"warnings":["File \"f.ml\", line 1, character 0 to line 2, character 13:\nIllegal character or syntax '@author Bar}}' in '{ul ...}' (bulleted list)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_list =
test "{ul @author Foo}";
[%expect
{|
-        {"value":[{"`List":["`Unordered",[]]}],"warnings":["File \"f.ml\", line 1, characters 4-16:\n'@author' is not allowed in '{ul ...}' (bulleted list).\nSuggestion: move '@author' outside the list.","File \"f.ml\", line 1, characters 16-16:\nEnd of text is not allowed in '{ul ...}' (bulleted list).\nSuggestion: add '}'.","File \"f.ml\", line 1, characters 0-3:\n'{ul ...}' (bulleted list) should not be empty.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+        {"value":[{"`List":["`Unordered",[]]}],"warnings":["File \"f.ml\", line 1, characters 0-16:\nIllegal character or syntax '@author Foo}' in '{ul ...}' (bulleted list)","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let in_code_block =
test "{[@author Foo]}";
@@ -920,51 +920,54 @@ let%expect_test _ =
test "{[foo]} @author Bar";
[%expect
{|
-        {"value":[{"`Code_block":["None","foo"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 8-19:\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":[{"`Code_block":["None","foo"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let after_verbatim =
test "{v foo v} @author Bar";
[%expect
{|
-        {"value":[{"`Verbatim":"foo"},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 10-21:\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":[{"`Verbatim":"foo"},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]


let after_heading =
test "{2 Foo} @author Bar";
-      [%expect
-        {|
-        {"value":[{"`Heading":[{"heading_level":"`Subsection","heading_label_explicit":"false"},{"`Label":[{"`Page":["None","f.ml"]},"foo"]},[{"`Word":"Foo"}]]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 8-19:\n'@author' should begin on its own line."]} |}]
+      [%expect.unreachable]


let after_list =
test "{ul {li foo}} @author Bar";
-      [%expect
-        {|
-        {"value":[{"`List":["`Unordered",[[{"`Paragraph":[{"`Word":"foo"}]}]]]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 14-25:\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."]} |}]
+      [%expect.unreachable]


let preceded_by_whitespace =
test "@author Foo Bar";
-      [%expect
-        {|
-          {"value":[{"`Tag":{"`Author":"Foo Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+      [%expect.unreachable]


let second_preceded_by_whitespace =
test "@author Foo\n @author Bar";
-      [%expect
-        {|
-        {"value":[{"`Tag":{"`Author":"Foo"}},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+      [%expect.unreachable]


let prefix =
test "@authorfoo";
-      [%expect
-        {|
-        {"value":[{"`Paragraph":[{"`Word":"@authorfoo"}]}],"warnings":["File \"f.ml\", line 1, characters 0-10:\nUnknown tag '@authorfoo'.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}]
+      [%expect.unreachable]


let not_allowed =
test ~tags_allowed:false "@author Foo bar";
-      [%expect
-        {|
-        {"value":[{"`Tag":{"`Author":"Foo bar"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml\", line 1, characters 0-15:\nTags are not allowed in pages."]} |}]
+      [%expect.unreachable]
end in
()
+[@@expect.uncaught_exn {|
+  (* CR expect_test_collector: This test expectation appears to contain a backtrace.
+     This is strongly discouraged as backtraces are fragile.
+     Please change this test to not include a backtrace. *)
+
+  (Odoc_parser__Parser.MenhirBasics.Error)
+  Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
+  Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
+  Called from Odoc_model__Semantics.parse_comment.(fun) in file "src/model/semantics.ml", line 605, characters 8-49
+  Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+  Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+  Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+  Called from Odoc_model_semantics_test__Test.test in file "test/model/semantics/test.ml", line 33, characters 4-149
+  Called from Odoc_model_semantics_test__Test.(fun).Author.after_heading in file "test/model/semantics/test.ml", line 932, characters 6-32
+  Called from Expect_test_collector.Make.Instance_io.exec in file "collector/expect_test_collector.ml", line 234, characters 12-19 |}]


let%expect_test _ =
let module Reference_component_kind = struct
@@ -2664,13 +2667,13 @@ let%expect_test _ =
test "@canonical .Foo";
[%expect
{|
-        {"value":[],"warnings":["File \"f.ml\", line 1, characters 11-15:\nExpected a valid path."]} |}]
+        {"value":[],"warnings":["File \"f.ml\", line 1, characters 0-15:\nExpected a valid path."]} |}]


let canonical_empty_name =
test "@canonical Foo.";
[%expect
{|
-        {"value":[],"warnings":["File \"f.ml\", line 1, characters 11-15:\nExpected a valid path."]} |}]
+        {"value":[],"warnings":["File \"f.ml\", line 1, characters 0-15:\nExpected a valid path."]} |}]


let internal_whitespace =
test "{!foo. bar .baz}";
File "test/generators/link.dune.inc", lines 625-631, characters 0-152:
625 | (rule
626 |  (target section.odoc)
627 |  (package odoc)
628 |  (action
629 |   (run odoc compile -o %{target} %{dep:section.cmti}))
630 |  (enabled_if
631 |   (>= %{ocaml_version} 4.04)))
(cd _build/default/test/generators && ../../../install/default/bin/odoc compile -o section.odoc section.cmti)
odoc: internal error, uncaught exception:
Odoc_parser__Parser.MenhirBasics.Error
Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
Called from Odoc_model__Semantics.parse_comment.(fun) in file "src/model/semantics.ml", line 605, characters 8-49
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_loader__Doc_attr.read_string in file "src/loader/doc_attr.ml", line 152, characters 2-135
Called from Odoc_loader__Doc_attr.read_string_comment in file "src/loader/doc_attr.ml" (inlined), line 161, characters 2-71
Called from Odoc_loader__Doc_attr.standalone in file "src/loader/doc_attr.ml", line 174, characters 25-81
Called from Odoc_loader__Cmti.read_signature_item in file "src/loader/cmti.ml", line 724, characters 16-91
Called from Odoc_loader__Cmti.read_signature.(fun) in file "src/loader/cmti.ml", line 808, characters 24-61
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 806, characters 4-127
Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
File "test/generators/link.dune.inc", lines 553-559, characters 0-154:
553 | (rule
554 |  (target ocamlary.odoc)
555 |  (package odoc)
556 |  (action
557 |   (run odoc compile -o %{target} %{dep:ocamlary.cmti}))
558 |  (enabled_if
559 |   (>= %{ocaml_version} 4.14)))
(cd _build/default/test/generators && ../../../install/default/bin/odoc compile -o ocamlary.odoc ocamlary.cmti)
odoc: internal error, uncaught exception:
Odoc_parser__Parser.MenhirBasics.Error
Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
Called from Odoc_loader__Doc_attr.extract_top_comment.extract in file "src/loader/doc_attr.ml", line 236, characters 14-69
Called from Odoc_loader__Doc_attr.extract_top_comment in file "src/loader/doc_attr.ml", line 250, characters 32-45
Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 803, characters 4-76
Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
(cd _build/default/test/generators && ../../../install/default/bin/odoc compile -o module.odoc module.cmti)
File "cases/module.mli", line 6, characters 35-54:
Warning: '{{:...} ...}' (external link) should not be empty.
File "test/generators/link.dune.inc", lines 393-399, characters 0-150:
393 | (rule
394 |  (target markup.odoc)
395 |  (package odoc)
396 |  (action
397 |   (run odoc compile -o %{target} %{dep:markup.cmti}))
398 |  (enabled_if
399 |   (>= %{ocaml_version} 4.04)))
(cd _build/default/test/generators && ../../../install/default/bin/odoc compile -o markup.odoc markup.cmti)
odoc: internal error, uncaught exception:
Odoc_parser__Parser.MenhirBasics.Error
Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
Called from Odoc_model__Semantics.parse_comment.(fun) in file "src/model/semantics.ml", line 605, characters 8-49
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_loader__Doc_attr.read_string in file "src/loader/doc_attr.ml", line 152, characters 2-135
Called from Odoc_loader__Doc_attr.read_string_comment in file "src/loader/doc_attr.ml" (inlined), line 161, characters 2-71
Called from Odoc_loader__Doc_attr.standalone in file "src/loader/doc_attr.ml", line 174, characters 25-81
Called from Odoc_loader__Cmti.read_signature_item in file "src/loader/cmti.ml", line 724, characters 16-91
Called from Odoc_loader__Cmti.read_signature.(fun) in file "src/loader/cmti.ml", line 808, characters 24-61
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 806, characters 4-127
Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
File "test/generators/link.dune.inc", lines 273-279, characters 0-152:
273 | (rule
274 |  (target include.odoc)
275 |  (package odoc)
276 |  (action
277 |   (run odoc compile -o %{target} %{dep:include.cmti}))
278 |  (enabled_if
279 |   (>= %{ocaml_version} 4.04)))
(cd _build/default/test/generators && ../../../install/default/bin/odoc compile -o include.odoc include.cmti)
odoc: internal error, uncaught exception:
Odoc_parser__Parser.MenhirBasics.Error
Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
Called from Odoc_loader__Doc_attr.attached.loop in file "src/loader/doc_attr.ml", line 133, characters 14-73
Called from Odoc_loader__Doc_attr.attached in file "src/loader/doc_attr.ml", line 143, characters 25-41
Called from Odoc_loader__Cmti.read_include in file "src/loader/cmti.ml", line 767, characters 20-144
Called from Odoc_loader__Cmti.read_signature.(fun) in file "src/loader/cmti.ml", line 808, characters 24-61
Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 806, characters 4-127
Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
(cd _build/default/test/generators && ../../../install/default/bin/odoc link -o tag_link.odocl tag_link.odoc)
File "cases/tag_link.ml", line 5, character 21 to line 6, character 4:
Warning: Failed to resolve reference unresolvedroot(Foo) Couldn't find "Foo"
(cd _build/default/test/generators && ../../../install/default/bin/odoc link -o stop_dead_link_doc.odocl stop_dead_link_doc.odoc)
File "stop_dead_link_doc.odoc":
Warning: Hidden constructors in type 'Stop_dead_link_doc.another_bar_'
File "stop_dead_link_doc.odoc":
Warning: Hidden constructors in type 'Stop_dead_link_doc.another_foo_'
File "stop_dead_link_doc.odoc":
Warning: Hidden constructors in type 'Stop_dead_link_doc.another_bar'
File "stop_dead_link_doc.odoc":
Warning: Hidden constructors in type 'Stop_dead_link_doc.another_foo'
File "test/xref2/canonical_module_type.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t _build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t.corrected
diff --git a/_build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t b/_build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t.corrected
index 609ef33..fc336eb 100644
--- a/_build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t
+++ b/_build/.sandbox/3013117a4d667f6d13de8b05bc595c6b/default/test/xref2/canonical_module_type.t/run.t.corrected
@@ -37,8 +37,8 @@ constructor where the second element of the tuple is Resolved.
Every module type aliases and the path they link to:


$ odoc_print test.odocl | jq -c '.content.Module.items | .[] | select(.ModuleType.expr.Some.Path) | .ModuleType | { "from": .id, "to": .expr.Some.Path.p_path }'
-  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"X"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"B"]}},{"`Resolved":{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"X"]}}}]}}}
-  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Y"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"A"]}},{"`Resolved":{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Y"]}}}]}}}
-  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Z"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"A"]}},{"`Resolved":{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Y"]}}}]}}}
-  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"AB"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"AA"]}},{"`Resolved":{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"AB"]}}}]}}}
+  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"X"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"B"]}},{"`DotMT":[{"`Root":"Test"},"X "]}]}}}
+  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Y"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"A"]}},{"`DotMT":[{"`Root":"Test"},"Y "]}]}}}
+  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"Z"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"A"]}},{"`DotMT":[{"`Root":"Test"},"Y "]}]}}}
+  {"from":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"AB"]},"to":{"`Resolved":{"`CanonicalModuleType":[{"`Identifier":{"`ModuleType":[{"`Root":[{"Some":{"`Page":["None","x"]}},"Test"]},"AA"]}},{"`DotMT":[{"`Root":"Test"},"AB "]}]}}}


File "test/xref2/canonical_hidden_module.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t _build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t.corrected
diff --git a/_build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t b/_build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t.corrected
index 6c1eced..9b7179e 100644
--- a/_build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t
+++ b/_build/.sandbox/b8b16b5a72a4c581ed56c8eba1d79cc1/default/test/xref2/canonical_hidden_module.t/run.t.corrected
@@ -62,7 +62,6 @@ See the comments on the types at the end of test.mli for the expectation.
$ odoc html-generate test.odocl --indent -o .
$ odoc support-files -o .
$ find Test -type f | sort
-  Test/A/index.html
Test/A_nonhidden/index.html
Test/B/index.html
Test/C/index.html
@@ -102,12 +101,8 @@ See the comments on the types at the end of test.mli for the expectation.
<div class="odoc-spec">
<div class="spec module anchored" id="module-A">
<a href="#module-A" class="anchor"></a>
-       <code>
-        <span><span class="keyword">module</span> <a href="A/index.html">A</a>
-        </span>
-        <span> : <span class="keyword">sig</span> ... 
-         <span class="keyword">end</span>
-        </span>
+       <code><span><span class="keyword">module</span> A</span>
+        <span> = <a href="A_nonhidden/index.html">A_nonhidden</a></span>
</code>
</div>
<div class="spec-doc"><p>This should not have an expansion</p></div>
@@ -153,7 +148,8 @@ See the comments on the types at the end of test.mli for the expectation.
<div class="spec type anchored" id="type-a">
<a href="#type-a" class="anchor"></a>
<code><span><span class="keyword">type</span> a</span>
-        <span> = <a href="A/index.html#type-t">A.t</a></span>
+        <span> = <a href="A_nonhidden/index.html#type-t">A_nonhidden.t</a>
+        </span>
</code>
</div>
<div class="spec-doc">
@@ -176,9 +172,7 @@ See the comments on the types at the end of test.mli for the expectation.
<div class="odoc-spec">
<div class="spec type anchored" id="type-c">
<a href="#type-c" class="anchor"></a>
-       <code><span><span class="keyword">type</span> c</span>
-        <span> = <a href="C/index.html#type-t">C.t</a></span>
-       </code>
+       <code><span><span class="keyword">type</span> c</span></code>
</div>
<div class="spec-doc">
<p>This should render as C.t and link to C/index.html</p>
@@ -187,9 +181,7 @@ See the comments on the types at the end of test.mli for the expectation.
<div class="odoc-spec">
<div class="spec type anchored" id="type-d">
<a href="#type-d" class="anchor"></a>
-       <code><span><span class="keyword">type</span> d</span>
-        <span> = <a href="D/index.html#type-t">D.t</a></span>
-       </code>
+       <code><span><span class="keyword">type</span> d</span></code>
</div>
<div class="spec-doc">
<p>This should render as D.t and link to D/index.html</p>
File "test/xref2/canonical_nested.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t _build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t.corrected
diff --git a/_build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t b/_build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t.corrected
index 948c02b..611ec64 100644
--- a/_build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t
+++ b/_build/.sandbox/bae1699fe8354227b0eea746149b63b1/default/test/xref2/canonical_nested.t/run.t.corrected
@@ -97,7 +97,7 @@ unresolved in the paths though:
"Test"
]
},
-                  "B"
+                  "B "
]
}
]
@@ -153,7 +153,7 @@ unresolved in the paths though:
{
"`Root": "Main"
},
-                  "Container"
+                  "Container "
]
}
]
@@ -225,91 +225,27 @@ unresolved in the paths though:
}
},
{
-                "`Resolved": {
-                  "`Identifier": {
-                    "`Module": [
+                "`Dot": [
+                  {
+                    "`Dot": [
{
-                        "`Module": [
+                        "`Dot": [
{
-                            "`Module": [
-                              {
-                                "`Root": [
-                                  "None",
-                                  "Main"
-                                ]
-                              },
-                              "Container"
-                            ]
+                            "`Root": "Main"
},
-                          "Test"
+                          "Container"
]
},
-                      "B"
+                      "Test"
]
-                  }
-                }
+                  },
+                  "B "
+                ]
}
]
}
},
-        {
-          "Some": {
-            "Signature": {
-              "items": [
-                {
-                  "Type": [
-                    "Ordinary",
-                    {
-                      "id": {
-                        "`Type": [
-                          {
-                            "`Module": [
-                              {
-                                "`Module": [
-                                  {
-                                    "`Module": [
-                                      {
-                                        "`Root": [
-                                          "None",
-                                          "Main"
-                                        ]
-                                      },
-                                      "Container"
-                                    ]
-                                  },
-                                  "Test"
-                                ]
-                              },
-                              "B"
-                            ]
-                          },
-                          "t"
-                        ]
-                      },
-                      "source_loc": "None",
-                      "doc": {
-                        "elements": [],
-                        "suppress_warnings": "false"
-                      },
-                      "equation": {
-                        "params": [],
-                        "private_": "false",
-                        "manifest": "None",
-                        "constraints": []
-                      },
-                      "representation": "None"
-                    }
-                  ]
-                }
-              ],
-              "compiled": "true",
-              "doc": {
-                "elements": [],
-                "suppress_warnings": "false"
-              }
-            }
-          }
-        }
+        "None"
]
},
"canonical": "None",
File "test/xref2/canonical_alias.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t _build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t.corrected
diff --git a/_build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t b/_build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t.corrected
index 30d4fd3..6dd7618 100644
--- a/_build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t
+++ b/_build/.sandbox/38d04e21e27a06371f0ac696e6ad98ea/default/test/xref2/canonical_alias.t/run.t.corrected
@@ -6,148 +6,69 @@


The following should be resolved as identifier Test.A
$ odoc_print -r test test.odocl | jq '.equation.manifest.Some.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
-  {
-    "`Resolved": {
-      "`Identifier": {
-        "`Module": [
-          {
-            "`Root": [
-              "None",
-              "Test"
-            ]
-          },
-          "A"
-        ]
-      }
-    }
-  }
+  jq: error (at <stdin>:11): Cannot index string with string "Some"
+  [5]


The following should be resolved as Test.Wrapper.X


$ odoc_print -r test2 test.odocl | jq '.equation.manifest.Some.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
{
-    "`Resolved": {
-      "`Module": [
-        {
-          "`Identifier": {
-            "`Module": [
-              {
-                "`Root": [
-                  "None",
-                  "Test"
-                ]
-              },
-              "Wrapper"
-            ]
-          }
-        },
-        "X"
-      ]
-    }
+    "`Dot": [
+      {
+        "`Dot": [
+          {
+            "`Root": "Test"
+          },
+          "Wrapper"
+        ]
+      },
+      "X "
+    ]
}


The following should be resolved as Test.Wrapper2.X


$ odoc_print -r test3 test.odocl | jq '.equation.manifest.Some.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
-  {
-    "`Resolved": {
-      "`Module": [
-        {
-          "`Identifier": {
-            "`Module": [
-              {
-                "`Root": [
-                  "None",
-                  "Test"
-                ]
-              },
-              "Wrapper2"
-            ]
-          }
-        },
-        "X"
-      ]
-    }
-  }
+  jq: error (at <stdin>:11): Cannot index string with string "Some"
+  [5]


This should probably not resolve at all, but that's a problem for another day. currently it resolves as Test.Wrapper3.X


$ odoc_print -r test3a test.odocl | jq '.type_.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
{
-    "`Resolved": {
-      "`Module": [
-        {
-          "`Identifier": {
-            "`Module": [
-              {
-                "`Root": [
-                  "None",
-                  "Test"
-                ]
-              },
-              "Wrapper3"
-            ]
-          }
-        },
-        "X"
-      ]
-    }
+    "`Dot": [
+      {
+        "`Dot": [
+          {
+            "`Root": "Test"
+          },
+          "Wrapper3"
+        ]
+      },
+      "X "
+    ]
}


Should resolve as identifier Test.B
$ odoc_print -r test4 test.odocl | jq '.equation.manifest.Some.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
{
-    "`Resolved": {
-      "`Identifier": {
-        "`Module": [
-          {
-            "`Root": [
-              "None",
-              "Test"
-            ]
-          },
-          "B"
-        ]
-      }
-    }
+    "`Dot": [
+      {
+        "`Root": "Test"
+      },
+      "B "
+    ]
}


Should resove to be an alias!
$ odoc_print -r test5 test.odocl | jq '.equation.manifest.Some.Constr[0]["`Resolved"]["`Type"][0]["`Canonical"][1]'
{
-    "`Resolved": {
-      "`Alias": [
-        {
-          "`Identifier": {
-            "`Module": [
-              {
-                "`Root": [
-                  "None",
-                  "Test"
-                ]
-              },
-              "C_"
-            ]
-          }
-        },
-        {
-          "`Identifier": [
-            {
-              "`Module": [
-                {
-                  "`Root": [
-                    "None",
-                    "Test"
-                  ]
-                },
-                "C"
-              ]
-            },
-            "false"
-          ]
-        }
-      ]
-    }
+    "`Dot": [
+      {
+        "`Root": "Test"
+      },
+      "C "
+    ]
}


File "test/xref2/github_issue_342.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t _build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t.corrected
diff --git a/_build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t b/_build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t.corrected
index ea4fe60..e87c6e9 100644
--- a/_build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t
+++ b/_build/.sandbox/93880f16b17c20d754057fd4ae396570/default/test/xref2/github_issue_342.t/run.t.corrected
@@ -14,24 +14,24 @@ The table of content:
<nav class="odoc-toc odoc-local-toc">
<ul>
<li>
-        <a href="#references--and-with-text-in-title">References <code>A</code>
-          and with text in title
+        <a href="#-references--and-with-text-in-title"> References 
+         <code>A</code> and with text in title
</a>
</li>
<li>
-        <a href="#an-url--and-with-text-in-a-title">An url http://ocaml.org
+        <a href="#-an-url--and-with-text-in-a-title"> An url http://ocaml.org
and with text in a title


The rendered headings


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


File "test/xref2/gh749.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t _build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t.corrected
diff --git a/_build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t b/_build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t.corrected
index 6269710..af4909d 100644
--- a/_build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t
+++ b/_build/.sandbox/43c1b0739c7cc8bd54491131e4de9e24/default/test/xref2/gh749.t/run.t.corrected
@@ -1,9 +1,9 @@
$ compile good_ref.mli


$ compile bad_ref.mli
-  File "bad_ref.mli", line 7, characters 8-18:
+  File "bad_ref.mli", line 7, characters 105-18:
Warning: Failed to resolve reference unresolvedroot(( * )) Couldn't find "( * )"
-  File "bad_ref.mli", line 3, characters 8-18:
+  File "bad_ref.mli", line 3, characters 51-18:
Warning: Failed to resolve reference unresolvedroot(( ^ )) Couldn't find "( ^ )"


$ jq_scan_references() { jq -c '.. | .["`Reference"]? | select(.) | .[0]'; }
File "test/xref2/github_issue_1103.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t _build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t.corrected
diff --git a/_build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t b/_build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t.corrected
index 92dac31..a463f59 100644
--- a/_build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t
+++ b/_build/.sandbox/8a0271c825fe6042b3a8c681d8ed7b2c/default/test/xref2/github_issue_1103.t/run.t.corrected
@@ -2,6 +2,8 @@
$ ocamlc -bin-annot -c test.mli
$ odoc compile to_open.cmti
$ odoc compile -I . test.cmti
+  File "test.mli", line 5, characters 14-15:
+  Warning: Identifier in reference should not be empty.


The following should not result in any unresolved references


File "test/xref2/canonical_module.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t _build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t.corrected
diff --git a/_build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t b/_build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t.corrected
index dac3d73..fb1ab7c 100644
--- a/_build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t
+++ b/_build/.sandbox/3af43b8c8bb02a7b11f8ca96ad15438e/default/test/xref2/canonical_module.t/run.t.corrected
@@ -8,9 +8,9 @@ The module Test_x is expected to be referenced as Test.X.
Test_x and Test_y have a 'canonical' field:


$ odoc_print test_x.odocl | jq -c ".canonical"
-  {"Some":{"`Dot":[{"`Root":"Test"},"X"]}}
+  {"Some":{"`Dot":[{"`Root":"Test"},"X "]}}
$ odoc_print test_y.odocl | jq -c ".canonical"
-  {"Some":{"`Dot":[{"`Root":"Test"},"Y"]}}
+  {"Some":{"`Dot":[{"`Root":"Test"},"Y "]}}


Test_x is defined as a .mli file and Test_y as a .ml file in order to test the
loader code handling canonical tags.
@@ -21,9 +21,9 @@ have it in the top-comment.
Every references should be marked as canonical:


$ odoc_print test.odocl | jq -c ".content.Module.items | .[] | .Module[1].type_.Alias[0] | select(.)"
-  {"`Resolved":{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X"]}}}]}}
-  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Dot":[{"`Root":"Test"},"X"]}]},"Out"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X_out"]}}}]}}
-  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Dot":[{"`Root":"Test"},"X"]}]},"In"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"X_in"]}}}]}}
-  {"`Resolved":{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"Y"]}}}]}}
-  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Dot":[{"`Root":"Test"},"Y"]}]},"Out"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"Y_out"]}}}]}}
-  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Dot":[{"`Root":"Test"},"Y"]}]},"In"]},{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"Y_in"]}}}]}}
+  {"`Resolved":{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Dot":[{"`Root":"Test"},"X "]}]}}
+  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Dot":[{"`Root":"Test"},"X "]}]},"Out"]},{"`Dot":[{"`Root":"Test"},"X_out "]}]}}
+  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_x"]}},{"`Dot":[{"`Root":"Test"},"X "]}]},"In"]},{"`Dot":[{"`Root":"Test"},"X_in "]}]}}
+  {"`Resolved":{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Dot":[{"`Root":"Test"},"Y "]}]}}
+  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Dot":[{"`Root":"Test"},"Y "]}]},"Out"]},{"`Dot":[{"`Root":"Test"},"Y_out "]}]}}
+  {"`Resolved":{"`Canonical":[{"`Module":[{"`Canonical":[{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Test_y"]}},{"`Dot":[{"`Root":"Test"},"Y "]}]},"In"]},{"`Dot":[{"`Root":"Test"},"Y_in "]}]}}
File "test/xref2/github_issue_447.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t _build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t.corrected
diff --git a/_build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t b/_build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t.corrected
index b8c7efa..44d9301 100644
--- a/_build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t
+++ b/_build/.sandbox/05cd7b99ddea361967154e920868f80f/default/test/xref2/github_issue_447.t/run.t.corrected
@@ -9,7 +9,7 @@ the parent module. All references in [a.mli] resolve without warning, except the
faulty reference.


$ odoc link a.odoc
-  File "a.mli", line 15, characters 4-22:
+  File "a.mli", line 15, characters 218-22:
Warning: Failed to resolve reference unresolvedroot(t).A Couldn't find "t"


Let's now check that the reference point to the right page/anchor:
File "test/xref2/github_issue_857.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t _build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t.corrected
diff --git a/_build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t b/_build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t.corrected
index 3fc4b74..b667146 100644
--- a/_build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t
+++ b/_build/.sandbox/a2340150ee0281bd74f634e24cbc80bd/default/test/xref2/github_issue_857.t/run.t.corrected
@@ -19,7 +19,7 @@ In html, labels in subpages should not be disambiguated since they won't have th


$ cat html/A/index.html | grep 'id='
<div class="spec module-type anchored" id="module-type-A">
-     <h2 id="first"><a href="#first" class="anchor"></a>First outer section
+     <h2 id="first"><a href="#first" class="anchor"></a> First outer section


$ cat html/A/module-type-A/index.html | grep 'id='
-     <h2 id="first"><a href="#first" class="anchor"></a>First inner section
+     <h2 id="first"><a href="#first" class="anchor"></a> First inner section
File "test/xref2/github_issue_932.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t _build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t.corrected
diff --git a/_build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t b/_build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t.corrected
index 1e1834b..a1a1fb6 100644
--- a/_build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t
+++ b/_build/.sandbox/b3dbf8148a960938223540d723d570c8/default/test/xref2/github_issue_932.t/run.t.corrected
@@ -41,27 +41,29 @@ The rendered html
</li>
</ol>
--
-      <li>extension-decl-A : <a href="#extension-decl-A"><code>A</code></a>
+       <p>extension-decl-A : <a href="#extension-decl-A"><code>A</code></a>  
+       </p>
+       <p>extension-decl-B : <a href="#extension-decl-A"><code>B</code></a>  
+       </p><p>extension-A : <a href="#extension-A"><code>A</code></a>  </p>
+       <p>extension-B : <a href="#extension-B"><code>B</code></a>  </p>
+       <p>A : <a href="#extension-A"><code>A</code></a></p>
</li>
-      <li>extension-decl-B : <a href="#extension-decl-A"><code>B</code></a>
-      </li><li>extension-A : <a href="#extension-A"><code>A</code></a></li>
-      <li>extension-B : <a href="#extension-B"><code>B</code></a></li>
-      <li>A : <a href="#extension-A"><code>A</code></a></li>
</ul>
-     <ul><li>M.t : <a href="M/index.html#type-t"><code>M.t</code></a></li>
-      <li>M.extension-decl-A : 
-       <a href="M/index.html#extension-decl-A"><code>M.A</code></a>
-      </li>
-      <li>M.extension-decl-B : 
-       <a href="M/index.html#extension-decl-A"><code>M.B</code></a>
-      </li>
-      <li>M.extension-A : 
-       <a href="M/index.html#extension-A"><code>M.A</code></a>
-      </li>
-      <li>M.extension-B : 
-       <a href="M/index.html#extension-B"><code>M.B</code></a>
+     <ul>
+  --
+       <p>M.extension-decl-A : 
+        <a href="M/index.html#extension-decl-A"><code>M.A</code></a>  
+       </p>
+       <p>M.extension-decl-B : 
+        <a href="M/index.html#extension-decl-A"><code>M.B</code></a>  
+       </p>
+       <p>M.extension-A : 
+        <a href="M/index.html#extension-A"><code>M.A</code></a>  
+       </p>
+       <p>M.extension-B : 
+        <a href="M/index.html#extension-B"><code>M.B</code></a>  
+       </p>
+       <p>M.A : <a href="M/index.html#extension-A"><code>M.A</code></a> </p>
</li>
-      <li>M.A : <a href="M/index.html#extension-A"><code>M.A</code></a></li>
</ul>
</div>
-   </body>
File "test/xref2/label_reference_text.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t _build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t.corrected
diff --git a/_build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t b/_build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t.corrected
index 9233670..972fa13 100644
--- a/_build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t
+++ b/_build/.sandbox/974a4622ab319bf446df8ae1062f343a/default/test/xref2/label_reference_text.t/run.t.corrected
@@ -14,15 +14,15 @@ A quick test to repro the issue found in #941
The rendered html


$ cat html/Foo/index.html | grep "splice_me" -A 3
-      <ul><li><a href="#splice_me">Splice me</a></li></ul>
+      <ul><li><a href="#splice_me"> Splice me</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-     <h3 id="splice_me"><a href="#splice_me" class="anchor"></a>Splice me</h3>
-     <p>Should output only the heading's text: 
-      <a href="#splice_me" title="splice_me">Splice me</a> 
-      <a href="#splice_me" title="splice_me">Splice me</a> 
-      <a href="../page.html#splice_me" title="splice_me">Splice me</a>
+     <h3 id="splice_me"><a href="#splice_me" class="anchor"></a> Splice me</h3>
+     <p>Should output only the heading's text:  
+      <a href="#splice_me" title="splice_me"> Splice me</a>  
+      <a href="#splice_me" title="splice_me"> Splice me</a>  
+      <a href="../page.html#splice_me" title="splice_me"> Splice me</a>
</p>
</div>
</body>
File "test/xref2/canonical_type.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t _build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t.corrected
diff --git a/_build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t b/_build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t.corrected
index 8079e28..23a9f28 100644
--- a/_build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t
+++ b/_build/.sandbox/b14c79f2d4c5eff07b83b4e23b8cff3c/default/test/xref2/canonical_type.t/run.t.corrected
@@ -81,71 +81,9 @@ polymorphic variants rather than Constrs
Canonical paths should be as short as possible. As such, the following ought to be just an Identifier:


$ odoc_print foo.odocl -r Type.Path.u | jq '.. | .["equation"]? | select(.) | .manifest.Some.Constr[0]["`Resolved"]["`CanonicalType"][1]'
-  {
-    "`Resolved": {
-      "`Identifier": {
-        "`Type": [
-          {
-            "`Module": [
-              {
-                "`Module": [
-                  {
-                    "`Root": [
-                      {
-                        "Some": {
-                          "`Page": [
-                            "None",
-                            "x"
-                          ]
-                        }
-                      },
-                      "Foo"
-                    ]
-                  },
-                  "Type"
-                ]
-              },
-              "Path"
-            ]
-          },
-          "t"
-        ]
-      }
-    }
-  }
+  null


And this one should be `` `Type(`Identifier,t) ``


$ odoc_print foo.odocl -r Type.t | jq '.. | .["equation"]? | select(.) | .manifest.Some.Constr[0]["`Resolved"]["`CanonicalType"][1]'
-  {
-    "`Resolved": {
-      "`Type": [
-        {
-          "`Identifier": {
-            "`Module": [
-              {
-                "`Module": [
-                  {
-                    "`Root": [
-                      {
-                        "Some": {
-                          "`Page": [
-                            "None",
-                            "x"
-                          ]
-                        }
-                      },
-                      "Foo"
-                    ]
-                  },
-                  "Type"
-                ]
-              },
-              "Path"
-            ]
-          }
-        },
-        "t"
-      ]
-    }
-  }
+  null
File "test/xref2/reference_to_polymorphic.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t _build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t.corrected
diff --git a/_build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t b/_build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t.corrected
index 186e1aa..43dc7b9 100644
--- a/_build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t
+++ b/_build/.sandbox/c1df3d16642e0a28fda6a4da84f841c6/default/test/xref2/reference_to_polymorphic.t/run.t.corrected
@@ -1,29 +1,16 @@
$ ocamlc -bin-annot main.ml
$ odoc compile main.cmt
$ odoc link main.odoc
-  File "main.ml", line 19, characters 5-23:
+  File "main.ml", line 19, character 38 to line 21, character 23:
Warning: Failed to resolve reference unresolvedroot(`On) Couldn't find "`On"
-  File "main.ml", line 18, characters 5-22:
+  File "main.ml", line 19, character 15 to line 20, character 22:
Warning: Failed to resolve reference unresolvedroot(On) Couldn't find "On"
-  File "main.ml", line 17, characters 5-11:
+  File "main.ml", line 19, characters 3-11:
Warning: Failed to resolve reference unresolvedroot(`On) Couldn't find "`On"
-  File "main.ml", line 16, characters 5-10:
+  File "main.ml", line 18, characters 15-10:
Warning: Failed to resolve reference unresolvedroot(On) Couldn't find "On"


$ odoc html-generate -o html --indent main.odocl
$ cat html/Main/index.html | grep "<li>" -A 3
-     <ul><li><a href="#type-switch.On"><code>switch.`On</code></a></li>
-      <li><a href="#type-switch.Off"><code>switch.`Off</code></a></li>
-      <li><a href="#type-switch.On"><code>switch.`On</code></a></li>
-      <li><a href="#type-switch.Off"><code>switch.`Off</code></a></li>
-      <li><a href="#type-switch.On"><code>switch.`On</code></a></li>
-      <li><a href="#type-switch.Off"><code>switch.`Off</code></a></li>
-      <li><a href="#type-switch.On"><code>switch.`On</code></a></li>
-      <li><a href="#type-switch.Off"><code>switch.`Off</code></a></li>
-     </ul><p>References in the environment don't work:</p>
-     <ul><li><code>On</code></li><li><code>`On</code></li>
-      <li><code>On</code></li><li><code>`On</code></li>
-     </ul>
-    </div>
-   </body>
+  [1]


File "test/xref2/module_list.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t _build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t.corrected
diff --git a/_build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t b/_build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t.corrected
index 9196654..261041a 100644
--- a/_build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t
+++ b/_build/.sandbox/f0cfc8e37916f22a749a563a48c43c32/default/test/xref2/module_list.t/run.t.corrected
@@ -1,16 +1,56 @@
# Testing {!modules:...} lists


$ compile external.mli starts_with_open.mli main.mli
-  File "main.mli", line 63, characters 22-43:
+  File "main.mli", line 1, characters 22-23:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 33-34:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 38-39:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 47-48:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 58-59:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 60-61:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 1, characters 62-63:
+  Warning: Identifier ireference should not be empty.
+  File "main.mli", line 2, characters 0-4:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 15-16:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 25-26:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 31-32:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 34-35:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 37-38:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 2, characters 52-53:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 3, characters 0-4:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 3, characters 20-21:
+  Warning: Identifier in reference should not be empty.
+  File "main.mli", line 63, characters 1088-43:
Warning: Failed to resolve reference unresolvedroot(Resolve_synopsis).t Couldn't find "Resolve_synopsis"
-  File "main.mli", line 63, characters 17-21:
+  File "main.mli", line 63, characters 1083-21:
Warning: Failed to resolve reference unresolvedroot(t) Couldn't find "t"
-  File "external.mli", line 9, characters 6-10:
+  File "external.mli", line 11, character 106 to line 9, character 10:
Warning: Failed to resolve reference unresolvedroot(t) Couldn't find "t"
-  File "main.mli", line 63, characters 22-43:
+  File "main.mli", line 63, characters 1088-43:
Warning: Failed to resolve reference unresolvedroot(Resolve_synopsis).t Couldn't find "Resolve_synopsis"
-  File "main.mli", line 63, characters 17-21:
+  File "main.mli", line 63, characters 1083-21:
Warning: Failed to resolve reference unresolvedroot(t) Couldn't find "t"
+  File "main.mli", line 1, character 4 to line 3, character 47:
+  Warning: Failed to resolve reference unresolvedroot(
+  ) Parent_module: Lookup failure (root module): 
+  
+  File "main.mli", line 1, character 4 to line 3, character 47:
+  Warning: Failed to resolve reference unresolvedroot(
+  ) Parent_module: Lookup failure (root module): 
+  


Everything should resolve:


@@ -31,22 +71,26 @@ Everything should resolve:
{"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`Code_span":"F ()"},{"`Word":"."}]}
{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Type_of"]}}}
"None"
+  {"`Root":["\n","`TUnknown"]}
+  "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":"."}]}
{"`Resolved":{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"With_type"]}}}
{"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`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":"."}]}
-  {"`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"]}}]}}
+  {"`Resolved":{"`Alias":[{"`Canonical":[{"`Module":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}},"C1"]},{"`Dot":[{"`Root":"Main"},"C1 "]}]},{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"C1"]}}]}}
{"Some":[{"`Word":"Doc"},"`Space",{"`Word":"for"},"`Space",{"`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"]}}]}}
+  {"`Resolved":{"`Alias":[{"`Canonical":[{"`Module":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Main"]},"Internal"]}},"C2"]},{"`Dot":[{"`Root":"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":"."}]}
{"`Resolved":{"`Identifier":{"`Root":[{"Some":{"`Page":["None","test"]}},"Starts_with_open"]}}}
{"Some":[{"`Word":"Synopsis"},"`Space",{"`Word":"of"},"`Space",{"`Code_span":"Starts_with_open"},{"`Word":"."}]}
+  {"`Root":["\n","`TUnknown"]}
+  "None"
{"`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"},"`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","`Space",{"`Word":"shouldn't:"},"`Space",{"`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 +99,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"},"`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","`Space",{"`Word":"shouldn't:"},"`Space",{"`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.
File "test/xref2/module_preamble.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t _build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t.corrected
diff --git a/_build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t b/_build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t.corrected
index 6382509..6d964da 100644
--- a/_build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t
+++ b/_build/.sandbox/8c11ae552efca7fc1648ec84ddcff422/default/test/xref2/module_preamble.t/run.t.corrected
@@ -89,14 +89,14 @@ and that "hidden" modules (eg. `A__b`, rendered to `html/A__b`) are not rendered
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-      <ul><li><a href="#an-heading">An heading</a></li></ul>
+      <ul><li><a href="#-an-heading"> An heading</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-     <h3 id="an-heading"><a href="#an-heading" class="anchor"></a>An heading
+     <h3 id="-an-heading"><a href="#-an-heading" class="anchor"></a> An heading
</h3>
<p>This paragraph is not part of the preamble. It'll be rendered in
-       the &quot;content&quot;.
+       the  &quot;content&quot;.
</p>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
File "test/xref2/references_scope.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t _build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t.corrected
diff --git a/_build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t b/_build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t.corrected
index b2f43a9..22006f1 100644
--- a/_build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t
+++ b/_build/.sandbox/7cfd917ca020aa7e97d7c08ad2009cea/default/test/xref2/references_scope.t/run.t.corrected
@@ -1,7 +1,7 @@
# Testing the scope of references


$ compile a.mli shadowed.mli shadowed_through_open.mli
-  File "a.mli", line 18, characters 6-24:
+  File "a.mli", line 18, characters 430-24:
Warning: Failed to resolve reference unresolvedroot(C) Couldn't find "C"


$ jq_scan_references() { jq -c '.. | .["`Reference"]? | select(.)'; }
File "test/xref2/references_to_pages.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t _build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t.corrected
diff --git a/_build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t b/_build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t.corrected
index 0b9c36c..2749463 100644
--- a/_build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t
+++ b/_build/.sandbox/e36b8050ce7488af9902b8ce9645920e/default/test/xref2/references_to_pages.t/run.t.corrected
@@ -1,9 +1,9 @@
# References to pages and items in pages


$ compile p.mld good_references.mli bad_references.mli
-  File "bad_references.mli", line 6, characters 42-69:
+  File "bad_references.mli", line 6, characters 161-69:
Warning: Failed to resolve reference unresolvedroot(p).not_found Couldn't find page "not_found"
-  File "bad_references.mli", line 4, characters 20-37:
+  File "bad_references.mli", line 4, characters 97-37:
Warning: Failed to resolve reference unresolvedroot(not_found) Couldn't find page "not_found"


Every references in `Good_references` should resolve:
File "test/xref2/warnings.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t _build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t.corrected
diff --git a/_build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t b/_build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t.corrected
index ca9de08..0efc265 100644
--- a/_build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t
+++ b/_build/.sandbox/74a9fc1335d87ac9f4a75f853c6cf219/default/test/xref2/warnings.t/run.t.corrected
@@ -6,24 +6,24 @@ Test the behavior of warnings generated while compiling and linking.
A contains both parsing errors and a reference to B that isn't compiled yet:


$ odoc compile --warn-error --package test a.cmti
-  File "a.mli", line 8, characters 20-23:
+  File "a.mli", line 8, characters 151-154:
Error: Open bracket '{!' is never closed.
-  File "a.mli", line 8, characters 22-23:
+  File "a.mli", line 8, characters 153-154:
Error: Identifier in reference should not be empty.
ERROR: Warnings have been generated.
[1]


$ odoc compile --package test b.cmti
$ odoc compile --package test a.cmti
-  File "a.mli", line 8, characters 20-23:
+  File "a.mli", line 8, characters 151-154:
Warning: Open bracket '{!' is never closed.
-  File "a.mli", line 8, characters 22-23:
+  File "a.mli", line 8, characters 153-154:
Warning: Identifier in reference should not be empty.


$ odoc errors a.odoc
-  File "a.mli", line 8, characters 20-23:
+  File "a.mli", line 8, characters 151-154:
Open bracket '{!' is never closed.
-  File "a.mli", line 8, characters 22-23:
+  File "a.mli", line 8, characters 153-154:
Identifier in reference should not be empty.


A contains linking errors:
@@ -32,18 +32,18 @@ A contains linking errors:
File "a.odoc":
Warning: Couldn't find the following modules:
B
-  File "a.mli", line 6, characters 47-65:
+  File "a.mli", line 6, characters 108-65:
Warning: Failed to resolve reference unresolvedroot(B).doesn't_exist Couldn't find "B"


$ odoc errors a.odocl
-  File "a.mli", line 8, characters 20-23:
+  File "a.mli", line 8, characters 151-154:
Open bracket '{!' is never closed.
-  File "a.mli", line 8, characters 22-23:
+  File "a.mli", line 8, characters 153-154:
Identifier in reference should not be empty.
File "a.odoc":
Couldn't find the following modules:
B
-  File "a.mli", line 6, characters 47-65:
+  File "a.mli", line 6, characters 108-65:
Failed to resolve reference unresolvedroot(B).doesn't_exist Couldn't find "B"


It is possible to hide the warnings too:
File "test/xref2/hidden_modules.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t _build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t.corrected
diff --git a/_build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t b/_build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t.corrected
index bf02f09..8843b44 100644
--- a/_build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t
+++ b/_build/.sandbox/7eb970f8025a840704870692ec3a6b18/default/test/xref2/hidden_modules.t/run.t.corrected
@@ -65,7 +65,7 @@ aren't roots.
This shouldn't cause any warnings:


$ odoc link test.odoc -I .
-  File "test.mli", line 25, characters 8-17:
+  File "test.mli", line 25, characters 427-17:
Warning: Failed to resolve reference unresolvedroot(List).t Couldn't find "List"


There should be an expansion on `NotHidden`
File "test/xref2/path_references.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t _build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t.corrected
diff --git a/_build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t b/_build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t.corrected
index 1efc962..7c2c79f 100644
--- a/_build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t
+++ b/_build/.sandbox/554d5a658d307e853035b57c39b86860/default/test/xref2/path_references.t/run.t.corrected
@@ -10,22 +10,22 @@


$ odoc link -P pkg:h/pkg -L libname:h/pkg/libname h/pkg/subdir/page-dup.odoc
$ odoc link -P pkg:h/pkg -L libname:h/pkg/libname h/pkg/subdir/page-bar.odoc
-  File "doc/subdir/bar.mld", line 12, characters 39-48:
+  File "doc/subdir/bar.mld", line 12, character 39 to line 13, character 48:
Warning: Failed to resolve reference ./Test Path 'Test' not found
-  File "doc/subdir/bar.mld", line 12, characters 18-38:
+  File "doc/subdir/bar.mld", line 12, character 18 to line 13, character 38:
Warning: Failed to resolve reference /pkg/libname/Test Path '/pkg/libname/Test' not found
-  File "doc/subdir/bar.mld", line 12, characters 0-17:
+  File "doc/subdir/bar.mld", line 12, character 0 to line 13, character 17:
Warning: Failed to resolve reference //libname/Test Path '//libname/Test' not found
$ odoc link -P pkg:h/pkg -L libname:h/pkg/libname h/pkg/page-dup.odoc
$ odoc link -P pkg:h/pkg -L libname:h/pkg/libname h/pkg/page-foo.odoc
-  File "doc/foo.mld", line 12, characters 27-36:
+  File "doc/foo.mld", line 12, character 27 to line 13, character 36:
Warning: Failed to resolve reference ./Test Path 'Test' not found
-  File "doc/foo.mld", line 12, characters 0-9:
+  File "doc/foo.mld", line 12, character 0 to line 13, character 9:
Warning: Failed to resolve reference //Test Path '//Test' not found
-  File "doc/foo.mld", line 6, characters 35-41:
+  File "doc/foo.mld", line 6, character 35 to line 7, character 41:
Warning: Failed to resolve reference unresolvedroot(bar) Couldn't find "bar"
$ odoc link -P pkg:h/pkg -L libname:h/pkg/libname h/pkg/libname/test.odoc
-  File "test.ml", line 6, characters 38-44:
+  File "test.ml", line 6, characters 41-44:
Warning: Failed to resolve reference unresolvedroot(bar) Couldn't find "bar"


Helper that extracts references in a compact way. Headings help to interpret the result.
File "test/frontmatter/frontmatter.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t _build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t.corrected
diff --git a/_build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t b/_build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t.corrected
index d3a9cab..6329052 100644
--- a/_build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t
+++ b/_build/.sandbox/ec1ee3753a752cc898af0efe7010f5c3/default/test/frontmatter/frontmatter.t/run.t.corrected
@@ -52,10 +52,11 @@ When there is one frontmatter, it is extracted from the content:
"one_frontmatter"
]
},
-            "one-frontmatter"
+            "-one-frontmatter"
]
},
[
+          "`Space",
{
"`Word": "One"
},
@@ -107,10 +108,11 @@ When there is more than one children order, we raise a warning and keep only the
"two_frontmatters"
]
},
-            "two-frontmatters"
+            "-two-frontmatters"
]
},
[
+          "`Space",
{
"`Word": "Two"
},
File "test/xref2/labels/ambiguous_label.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t _build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t.corrected
diff --git a/_build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t b/_build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t.corrected
index ed422d4..ebc229b 100644
--- a/_build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t
+++ b/_build/.sandbox/d8a0e283341903c4537e61999f4cae49/default/test/xref2/labels/ambiguous_label.t/run.t.corrected
@@ -3,51 +3,62 @@ Labels don't follow OCaml's scoping rules:
- No nesting: It is not possible to disambiguate labels by nesting them inside sections.


$ compile test.ml test_2.ml
-  File "test.ml", line 25, characters 4-36:
-  Warning: Failed to resolve reference unresolvedroot(example_2) Couldn't find "example_2"
-  File "test.ml", line 16, characters 4-50:
-  Warning: Multiple sections named 'example' found. Please alter one to ensure reference is unambiguous. Locations:
-    File "test.ml", line 3, character 4
-    File "test.ml", line 18, character 4
-    File "test.ml", line 9, character 4
+  odoc: internal error, uncaught exception:
+        Odoc_parser__Parser.MenhirBasics.Error
+        Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
+        Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
+        Called from Odoc_loader__Doc_attr.extract_top_comment.extract in file "src/loader/doc_attr.ml", line 236, characters 14-69
+        Called from Odoc_loader__Doc_attr.extract_top_comment in file "src/loader/doc_attr.ml", line 250, characters 32-45
+        Called from Odoc_loader__Cmt.read_structure in file "src/loader/cmt.ml", line 604, characters 4-77
+        Called from Odoc_loader__Cmt.read_implementation in file "src/loader/cmt.ml", line 624, characters 4-124
+        Called from Odoc_loader.read_cmt in file "src/loader/odoc_loader.ml", line 181, characters 12-71
+        Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 132, characters 8-76
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
+        Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
+  Command failed: odoc compile -I . --package test 'test.cmt'
+  [1]


Contains some ambiguous labels:


$ odoc_print test.odocl | jq -c '.. | .["`Heading"]? | select(.) | .[1]'
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"section-1"]}
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example"]}
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"section-2"]}
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example"]}
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example"]}
-  {"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"example_3"]}
+  odoc_print: PATH argument: no 'test.odocl' file or directory
+  Usage: odoc_print [OPTION]… PATH
+  Try 'odoc_print --help' for more information.


$ odoc html-generate --indent -o html test.odocl
+  odoc: FILE.odocl argument: no 'test.odocl' file or directory
+  Usage: odoc html-generate [OPTION]… FILE.odocl
+  Try 'odoc html-generate --help' or 'odoc --help' for more information.
+  [2]


The table of content should point to unique anchors:


$ sed -n '/<nav class="odoc-toc odoc-local-toc">$/,/<\/nav>/p' html/test/Test/index.html
-     <nav class="odoc-toc odoc-local-toc">
-      <ul>
-       <li><a href="#section-1">Section 1</a>
-        <ul><li><a href="#example">Example</a></li></ul>
-       </li>
-       <li><a href="#section-2">Section 2</a>
-        <ul><li><a href="#example_2">Example</a></li>
-         <li><a href="#example__3">Example</a></li>
-         <li><a href="#example_3">Example_3</a></li>
-        </ul>
-       </li>
-      </ul>
-     </nav>
+  sed: html/test/Test/index.html: No such file or directory
+  [1]


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"}]]
+  odoc_print: PATH argument: no 'test.odocl' file or directory
+  Usage: odoc_print [OPTION]… PATH
+  Try 'odoc_print --help' for more information.


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"}]]
+  odoc_print: PATH argument: no 'test_2.odocl' file or directory
+  Usage: odoc_print [OPTION]… PATH
+  Try 'odoc_print --help' for more information.
File "test/model/internal_tags.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t _build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t.corrected
diff --git a/_build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t b/_build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t.corrected
index 387d778..c7cad96 100644
--- a/_build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t
+++ b/_build/.sandbox/66a85171717e6bf36bdd599e2ee8931c/default/test/model/internal_tags.t/run.t.corrected
@@ -3,17 +3,45 @@ We expect no warning for "good.mli". The code already ensures that either tags
are handled of a warning is emitted.


$ compile good.mli
+  odoc: internal error, uncaught exception:
+        Odoc_parser__Parser.MenhirBasics.Error
+        Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
+        Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
+        Called from Odoc_loader__Doc_attr.attached.loop in file "src/loader/doc_attr.ml", line 133, characters 14-73
+        Called from Odoc_loader__Doc_attr.attached in file "src/loader/doc_attr.ml", line 143, characters 25-41
+        Called from Odoc_loader__Cmti.read_include in file "src/loader/cmti.ml", line 767, characters 20-144
+        Called from Odoc_loader__Cmti.read_signature.(fun) in file "src/loader/cmti.ml", line 808, characters 24-61
+        Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
+        Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 806, characters 4-127
+        Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
+        Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
+        Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
+        Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
+  Command failed: odoc compile -I . --package test 'good.cmti'
+  [1]


We expect warnings to be emitted for each bad tags:


$ compile bad.mli
-  File "bad.mli", line 3, characters 4-11:
+  File "bad.mli", line 4, characters 4-11:
Warning: Unexpected tag '@inline' at this location.
-  File "bad.mli", line 7, characters 4-19:
+  File "bad.mli", line 8, characters 4-19:
Warning: Unexpected tag '@canonical' at this location.
-  File "bad.mli", line 12, characters 4-19:
+  File "bad.mli", line 13, characters 4-19:
Warning: Unexpected tag '@canonical' at this location.
-  File "bad.mli", line 17, characters 4-19:
+  File "bad.mli", line 18, characters 4-19:
Warning: Unexpected tag '@canonical' at this location.
-  File "bad.mli", line 21, characters 4-11:
+  File "bad.mli", line 22, characters 4-11:
Warning: Unexpected tag '@inline' at this location.
File "test/frontmatter/short_title.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t _build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t.corrected
diff --git a/_build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t b/_build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t.corrected
index 67f3a0e..57fef73 100644
--- a/_build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t
+++ b/_build/.sandbox/e53d1175ce5d3bafc5446de08e1a14fe/default/test/frontmatter/short_title.t/run.t.corrected
@@ -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"},"`Space"]}


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"},"`Space"]}


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","`Space"]}


With other block


@@ -35,7 +35,9 @@ With other block
> {0 Test1}
> EOF
$ odoc compile --parent-id pkg --output-dir _odoc index.mld
-  File "index.mld", line 1, characters 0-27:
+  File "index.mld":
+  Warning: Pages (.mld files) should start with a heading.
+  File "index.mld", line 1, characters 0-12:
Warning: Short titles cannot contain other block than a single paragraph
$ odoc_print _odoc/pkg/page-index.odoc | jq .frontmatter.short_title -c
"None"
@@ -59,7 +61,7 @@ Multiple occurrence
> {0 Test1}
> EOF
$ odoc compile --parent-id pkg --output-dir _odoc index.mld
-  File "index.mld", line 2, characters 0-15:
+  File "index.mld", line 2, character 0 to line 3, character 0:
Warning: Duplicated @short_title entry
$ odoc_print _odoc/pkg/page-index.odoc | jq .frontmatter.short_title -c
-  {"Some":[{"`Word":"yay"}]}
+  {"Some":[{"`Word":"yay"},"`Space"]}
File "test/parent_id/parent_id.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t _build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t.corrected
diff --git a/_build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t b/_build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t.corrected
index cdb42cb..9297017 100644
--- a/_build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t
+++ b/_build/.sandbox/5f9a185cd78d0db92a38431fc968e68b/default/test/parent_id/parent_id.t/run.t.corrected
@@ -64,5 +64,5 @@ Testing detection of package:
Testing missing file:
$ rm _odoc/pkg/dir1/page-my_page.odoc*
$ odoc link -P pkg:_odoc/pkg/ _odoc/pkg/page-file.odoc
-  File "file.mld", line 3, characters 0-20:
+  File "file.mld", line 3, character 0 to line 4, character 20:
Warning: Failed to resolve reference /pkg/dir1/my_page Path '/pkg/dir1/my_page' not found
File "test/parent_id/missing_indexes.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t _build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t.corrected
diff --git a/_build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t b/_build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t.corrected
index 229d60f..2a3ac42 100644
--- a/_build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t
+++ b/_build/.sandbox/176513ccd0784f8d92836035ffc71aa7/default/test/parent_id/missing_indexes.t/run.t.corrected
@@ -24,17 +24,17 @@ Root is used for the missing index in the unnamed root directory. TODO
<script src="highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
-   <body class="odoc"><nav class="odoc-nav">index &#x00BB; Foo</nav>
+   <body class="odoc"><nav class="odoc-nav">index &#x00BB;  Foo</nav>
<header class="odoc-preamble">
-     <h1 id="foo"><a href="#foo" class="anchor"></a>Foo</h1>
+     <h1 id="-foo"><a href="#-foo" class="anchor"></a> Foo</h1>
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-global-toc">
<ul>
<li>index
-        <ul><li><a href="bar.html">Bar</a></li>
-         <li>baz<ul><li><a href="baz/bli.html">Bli</a></li></ul></li>
-         <li><a href="#" class="current_unit">Foo</a></li>
+        <ul><li><a href="bar.html"> Bar</a></li>
+         <li>baz<ul><li><a href="baz/bli.html"> Bli</a></li></ul></li>
+         <li><a href="#" class="current_unit"> Foo</a></li>
</ul>
</li>
</ul>
File "test/frontmatter/toc_order.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t _build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t.corrected
diff --git a/_build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t b/_build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t.corrected
index 4d66f17..7836ae0 100644
--- a/_build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t
+++ b/_build/.sandbox/64c09fb60cfd24ed3496522616e03d92/default/test/frontmatter/toc_order.t/run.t.corrected
@@ -73,11 +73,11 @@ but this should be a warning!
$ cat _html/pkg/index.html | grep odoc-global-toc -A 11
<nav class="odoc-toc odoc-global-toc">
<ul>
-       <li><a href="#" class="current_unit">This is the main index</a>
-        <ul><li><a href="content.html">This is top level content</a></li>
+       <li><a href="#" class="current_unit"> This is the main index</a>
+        <ul><li><a href="content.html"> This is top level content</a></li>
<li><a href="Unit/index.html">Unit</a></li>
-         <li><a href="dir1/index.html">This is dir1's index</a></li>
-         <li><a href="omitted.html">This one is omitted</a></li>
+         <li><a href="dir1/index.html"> This is dir1's index</a></li>
+         <li><a href="omitted.html"> This one is omitted</a></li>
</ul>
</li>
</ul>
@@ -109,7 +109,7 @@ Some more parsing test:
> @children_order a
> EOF
$ odoc compile --parent-id pkg/doc --output-dir _odoc errors/index.mld
-  File "errors/index.mld", line 2, characters 0-17:
+  File "errors/index.mld", line 2, character 0 to line 3, character 0:
Warning: @children_order tag has to be before any content


$ cat << EOF > errors/not_index.mld
File "test/roots_and_hierarchy/sidebar_with_indexes.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t _build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t.corrected
diff --git a/_build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t b/_build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t.corrected
index e9adf94..ac2d6b3 100644
--- a/_build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t
+++ b/_build/.sandbox/81ab7e10a2f46c8072c86477a910e064/default/test/roots_and_hierarchy/sidebar_with_indexes.t/run.t.corrected
@@ -31,10 +31,10 @@ Since -L subfolders are omitted from -P roots, the index page should not be adde
$ cat html/pkg/index.html | grep odoc-global-toc -A 15
<nav class="odoc-toc odoc-global-toc">
<ul>
-       <li><a href="#" class="current_unit">Package <code>pkg</code></a>
-        <ul><li><a href="dir1/index.html">A directory</a></li>
-         <li><a href="file.html">File</a></li>
-         <li><a href="libname/index.html">Library landing page</a></li>
+       <li><a href="#" class="current_unit"> Package <code>pkg</code></a>
+        <ul><li><a href="dir1/index.html"> A directory</a></li>
+         <li><a href="file.html"> File</a></li>
+         <li><a href="libname/index.html"> Library landing page</a></li>
</ul>
</li>
</ul>
File "test/roots_and_hierarchy/sidebar.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t _build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t.corrected
diff --git a/_build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t b/_build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t.corrected
index 4c06828..a402a83 100644
--- a/_build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t
+++ b/_build/.sandbox/776d4c07805d28b517f708a9cc70e5ab/default/test/roots_and_hierarchy/sidebar.t/run.t.corrected
@@ -33,21 +33,21 @@ A json version of a sidebar can be obtained using the sidebar-generate command:
"node": {
"url": "pkg/index.html",
"kind": "leaf-page",
-        "content": "Package <code>pkg</code>"
+        "content": " Package <code>pkg</code>"
},
"children": [
{
"node": {
"url": "pkg/dir1/index.html",
"kind": "leaf-page",
-            "content": "A directory"
+            "content": " A directory"
},
"children": [
{
"node": {
"url": "pkg/dir1/my_page.html",
"kind": "leaf-page",
-                "content": "My page"
+                "content": " My page"
},
"children": []
}
@@ -57,7 +57,7 @@ A json version of a sidebar can be obtained using the sidebar-generate command:
"node": {
"url": "pkg/file.html",
"kind": "leaf-page",
-            "content": "File"
+            "content": " File"
},
"children": []
},
@@ -145,9 +145,9 @@ A json version of a sidebar can be obtained using the sidebar-generate command:
$ cat html/pkg/index.html | grep odoc-global-toc -A 15
<nav class="odoc-toc odoc-global-toc">
<ul>
-       <li><a href="#" class="current_unit">Package <code>pkg</code></a>
-        <ul><li><a href="dir1/index.html">A directory</a></li>
-         <li><a href="file.html">File</a></li>
+       <li><a href="#" class="current_unit"> Package <code>pkg</code></a>
+        <ul><li><a href="dir1/index.html"> A directory</a></li>
+         <li><a href="file.html"> File</a></li>
<li>libname
<ul><li><a href="libname/Unit/index.html">Unit</a></li></ul>
</li>
@@ -163,9 +163,9 @@ A json version of a sidebar can be obtained using the sidebar-generate command:
$ cat html/pkg/libname/Unit/X/index.html | grep odoc-global-toc -A 15
<nav class="odoc-toc odoc-global-toc">
<ul>
-       <li><a href="../../../index.html">Package <code>pkg</code></a>
-        <ul><li><a href="../../../dir1/index.html">A directory</a></li>
-         <li><a href="../../../file.html">File</a></li>
+       <li><a href="../../../index.html"> Package <code>pkg</code></a>
+        <ul><li><a href="../../../dir1/index.html"> A directory</a></li>
+         <li><a href="../../../file.html"> File</a></li>
<li>libname
<ul>
<li><a href="../index.html">Unit</a>
File "test/xref2/labels/ambiguous_label_warning.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t _build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t.corrected
diff --git a/_build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t b/_build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t.corrected
index bf6d953..268cb3c 100644
--- a/_build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t
+++ b/_build/.sandbox/7ea86be494affa3817238d757ec3eede/default/test/xref2/labels/ambiguous_label_warning.t/run.t.corrected
@@ -1,13 +1,36 @@
The warning only shows up for explicitly defined labels.


$ compile test.mli
-  File "test.mli", line 11, characters 4-14:
-  Warning: Multiple sections named 'heading' found. Please alter one to ensure reference is unambiguous. Locations:
-    File "test.mli", line 7, character 4
-    File "test.mli", line 9, character 4
-  File "test.mli", line 5, characters 4-14:
-  Warning: Label 'foo' is ambiguous. The other occurences are:
-    File "test.mli", line 3, character 4
-  File "test.mli", line 3, characters 4-14:
-  Warning: Label 'foo' is ambiguous. The other occurences are:
-    File "test.mli", line 5, character 4
+  odoc: internal error, uncaught exception:
+        Odoc_parser__Parser.MenhirBasics.Error
+        Raised at MenhirLib.Engine.Make.loop in file "lib/pack/menhirLib.ml", line 1725, characters 8-19
+        Called from Odoc_parser.parse_comment in file "src/parser/odoc_parser.ml", line 135, characters 30-74
+        Called from Odoc_model__Semantics.parse_comment.(fun) in file "src/model/semantics.ml", line 605, characters 8-49
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_loader__Doc_attr.read_string in file "src/loader/doc_attr.ml", line 152, characters 2-135
+        Called from Odoc_loader__Doc_attr.read_string_comment in file "src/loader/doc_attr.ml" (inlined), line 161, characters 2-71
+        Called from Odoc_loader__Doc_attr.standalone in file "src/loader/doc_attr.ml", line 174, characters 25-81
+        Called from Odoc_loader__Cmti.read_signature_item in file "src/loader/cmti.ml", line 724, characters 16-91
+        Called from Odoc_loader__Cmti.read_signature.(fun) in file "src/loader/cmti.ml", line 808, characters 24-61
+        Called from Stdlib__List.fold_left in file "list.ml", line 121, characters 24-34
+        Called from Odoc_loader__Cmti.read_signature in file "src/loader/cmti.ml", line 806, characters 4-127
+        Called from Odoc_loader__Cmti.read_interface in file "src/loader/cmti.ml", line 823, characters 4-124
+        Called from Odoc_loader.read_cmti in file "src/loader/odoc_loader.ml", line 122, characters 12-67
+        Called from Odoc_loader.wrap_errors.(fun) in file "src/loader/odoc_loader.ml", line 248, characters 10-14
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.resolve_and_substitute in file "src/odoc/compile.ml", line 129, characters 8-77
+        Called from Odoc_model__Error.catch in file "src/model/error.ml", line 54, characters 21-27
+        Called from Odoc_model__Error.catch_warnings.(fun) in file "src/model/error.ml", line 89, characters 18-22
+        Called from Odoc_model__Error.with_ref in file "src/model/error.ml", line 67, characters 12-16
+        Re-raised at Odoc_model__Error.with_ref in file "src/model/error.ml", line 72, characters 4-11
+        Called from Odoc_odoc__Compile.compile.(fun) in file "src/odoc/compile.ml", line 353, characters 6-216
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24
+        Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19
+        Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44
+  Command failed: odoc compile -I . --package test 'test.cmti'
+  [1]
File "test/search/html_search.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t _build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t.corrected
diff --git a/_build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t b/_build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t.corrected
index 0e65beb..946f3ab 100644
--- a/_build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t
+++ b/_build/.sandbox/dd56d82dc954bfe0964a3d0e23c663a8/default/test/search/html_search.t/run.t.corrected
@@ -82,24 +82,24 @@ The index file, one entry per line:
{"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"},{"kind":"Constructor","name":"A"}],"doc":"","kind":{"kind":"Constructor","args":{"kind":"Tuple","vals":["int","int"]},"res":"tdzdz"},"display":{"url":"page/Main/index.html#type-tdzdz.A","html":"<code class=\"entry-kind\">cons</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.tdzdz.</span><span class=\"entry-name\">A</span><code class=\"entry-rhs\"> : int * int -&gt; tdzdz</code></code><div class=\"entry-comment\"><div></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"},{"kind":"Constructor","name":"B"}],"doc":"Bliiiiiiiiiii","kind":{"kind":"Constructor","args":{"kind":"Tuple","vals":["int list","int"]},"res":"tdzdz"},"display":{"url":"page/Main/index.html#type-tdzdz.B","html":"<code class=\"entry-kind\">cons</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.tdzdz.</span><span class=\"entry-name\">B</span><code class=\"entry-rhs\"> : int list * int -&gt; tdzdz</code></code><div class=\"entry-comment\"><div><p>Bliiiiiiiiiii</p></div></div>"}}
{"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}}
+  {"id":[{"kind":"Root","name":"Main"}],"doc":" this is a title\nand this is a paragraph","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p> this is a title</p><p>and this is a paragraph</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><pre class=\"language-ocaml\"><code>blibli</code></pre></div></div>"}}
-  {"id":[{"kind":"Root","name":"Main"}],"doc":"this is a title\nand this is a paragraph","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>this is a title</p><p>and this is a paragraph</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/I/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><pre class=\"language-ocaml\"><code>blibli</code></pre></div></div>"}}
{"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph one","kind":{"kind":"Module"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph one</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-I","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-M","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"X"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-X","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">X</span></code><div class=\"entry-comment\"><div></div></div>"}}
-  {"id":[{"kind":"Page","name":"page"}],"doc":"A title\nA paragraph\nsome verbatim\nand code\na list of things bliblib","kind":{"kind":"Page"},"display":{"url":"page/index.html","html":"<code class=\"entry-kind\">page</code><code class=\"entry-title\"><span class=\"entry-name\">page</span></code><div class=\"entry-comment\"><div><p>A title</p><p>A paragraph</p><pre>some verbatim</pre><pre class=\"language-ocaml\"><code>and code</code></pre><ul><li>a list <em>of</em> things</li><li>bliblib</li></ul></div></div>"}}
+  {"id":[{"kind":"Page","name":"page"}],"doc":" A title\nA paragraph\nsome verbatim\nand code\na list of things  bliblib ","kind":{"kind":"Page"},"display":{"url":"page/index.html","html":"<code class=\"entry-kind\">page</code><code class=\"entry-title\"><span class=\"entry-name\">page</span></code><div class=\"entry-comment\"><div><p> A title</p><p>A paragraph</p><pre>some verbatim</pre><pre class=\"language-ocaml\"><code>and code</code></pre><ul><li><p>a list <em>of</em> things </p><p>bliblib </p></li></ul></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"t"}],"doc":"A comment","kind":{"kind":"TypeDecl","private":false,"manifest":"int","constraints":[]},"display":{"url":"page/Main/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = int</code></code><div class=\"entry-comment\"><div><p>A comment</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"}],"doc":"A comment aaaaaaaaaa","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/index.html#type-tdzdz","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">tdzdz</span><code class=\"entry-rhs\"> = A of int * int | B of int list * int</code></code><div class=\"entry-comment\"><div><p>A comment aaaaaaaaaa</p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"},{"kind":"Type","name":"t"}],"doc":"dsdsd","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/M/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.M.</span><span class=\"entry-name\">t</span></code><div class=\"entry-comment\"><div><p>dsdsd</p></div></div>"}}
{"id":[{"kind":"Root","name":"J"},{"kind":"Value","name":"uu"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/J/index.html#val-uu","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">J.</span><span class=\"entry-name\">uu</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem2"}],"doc":"lorem 2","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem2","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem2</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 2</p></div></div>"}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem3"}],"doc":"lorem 3","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem3","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem3</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 3</p></div></div>"}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem4"}],"doc":"lorem 4","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem4","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem4</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 4</p></div></div>"}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem"}],"doc":"lorem 1 and a link","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 1 and a <span>link</span></p></div></div>"}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem2"}],"doc":"lorem 2 ","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem2","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem2</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 2 </p></div></div>"}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem3"}],"doc":"lorem 3 ","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem3","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem3</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 3 </p></div></div>"}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem4"}],"doc":"lorem 4 ","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem4","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem4</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 4 </p></div></div>"}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem"}],"doc":"lorem 1 and a link ","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 1 and a <span>link</span> </p></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"uu"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-uu","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">uu</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"v"}],"doc":"a reference , and some formatted content with code and\ncode blocks","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-v","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">v</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>a reference <span><code>t</code></span>, and some <em>formatted</em> <b>content</b> with <code>code</code> and</p><pre class=\"language-ocaml\"><code>code blocks</code></pre></div></div>"}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}}
File "test/occurrences/double_wrapped.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t _build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t.corrected
diff --git a/_build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t b/_build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t.corrected
index 1f1e71d..9b71239 100644
--- a/_build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t
+++ b/_build/.sandbox/4c98ae58f457c357550e12ba2b347fac/default/test/occurrences/double_wrapped.t/run.t.corrected
@@ -66,9 +66,6 @@ Uses of B.Z are not counted since they go to a hidden module.
Uses of values Y.x and Z.y (in b.ml) are not counted since they come from a "local" module.


$ occurrences_print main.odoc-occurrences | sort
-  Main was used directly 0 times and indirectly 2 times
-  Main.A was used directly 1 times and indirectly 0 times
-  Main.B was used directly 1 times and indirectly 0 times


$ occurrences_print main__.odoc-occurrences | sort


@@ -77,18 +74,9 @@ A only uses "persistent" values: one it defines itself.


"Aliased" values are not counted since they become persistent
$ occurrences_print main__B.odoc-occurrences | sort
-  Main was used directly 0 times and indirectly 7 times
-  Main.A was used directly 2 times and indirectly 5 times
-  Main.A.(||>) was used directly 1 times and indirectly 0 times
-  Main.A.M was used directly 2 times and indirectly 0 times
-  Main.A.t was used directly 1 times and indirectly 0 times
-  Main.A.x was used directly 1 times and indirectly 0 times


"Aliased" values are not counted since they become persistent
$ occurrences_print main__C.odoc-occurrences | sort
-  Main was used directly 0 times and indirectly 2 times
-  Main.A was used directly 1 times and indirectly 1 times
-  Main.A.x was used directly 1 times and indirectly 0 times


Now we can merge all tables


@@ -101,13 +89,6 @@ Now we can merge all tables


$ occurrences_print aggregated.odoc-occurrences | sort > all_merged
$ cat all_merged
-  Main was used directly 0 times and indirectly 11 times
-  Main.A was used directly 4 times and indirectly 6 times
-  Main.A.(||>) was used directly 1 times and indirectly 0 times
-  Main.A.M was used directly 2 times and indirectly 0 times
-  Main.A.t was used directly 1 times and indirectly 0 times
-  Main.A.x was used directly 2 times and indirectly 0 times
-  Main.B was used directly 1 times and indirectly 0 times


Compare with the one created directly with all occurrences:


@@ -119,26 +100,24 @@ We can also include hidden ids:


$ odoc count-occurrences main__B -o b.odoc-occurrences --include-hidden
$ occurrences_print b.odoc-occurrences | sort
-  Main was used directly 0 times and indirectly 7 times
-  Main.A was used directly 2 times and indirectly 5 times
-  Main.A.(||>) was used directly 1 times and indirectly 0 times
-  Main.A.M was used directly 2 times and indirectly 0 times
-  Main.A.t was used directly 1 times and indirectly 0 times
-  Main.A.x was used directly 1 times and indirectly 0 times
-  Main__ was used directly 0 times and indirectly 2 times
+  Main__ was used directly 0 times and indirectly 9 times
+  Main__.A was used directly 2 times and indirectly 5 times
+  Main__.A.(||>) was used directly 1 times and indirectly 0 times
+  Main__.A.M was used directly 2 times and indirectly 0 times
+  Main__.A.t was used directly 1 times and indirectly 0 times
+  Main__.A.x was used directly 1 times and indirectly 0 times
Main__.C was used directly 1 times and indirectly 1 times
Main__.C.y was used directly 1 times and indirectly 0 times


$ odoc count-occurrences . -o all.odoc-occurrences --include-hidden
$ occurrences_print all.odoc-occurrences | sort
-  Main was used directly 0 times and indirectly 11 times
-  Main.A was used directly 4 times and indirectly 6 times
-  Main.A.(||>) was used directly 1 times and indirectly 0 times
-  Main.A.M was used directly 2 times and indirectly 0 times
-  Main.A.t was used directly 1 times and indirectly 0 times
-  Main.A.x was used directly 2 times and indirectly 0 times
-  Main.B was used directly 1 times and indirectly 0 times
-  Main__ was used directly 0 times and indirectly 2 times
+  Main__ was used directly 0 times and indirectly 13 times
+  Main__.A was used directly 4 times and indirectly 6 times
+  Main__.A.(||>) was used directly 1 times and indirectly 0 times
+  Main__.A.M was used directly 2 times and indirectly 0 times
+  Main__.A.t was used directly 1 times and indirectly 0 times
+  Main__.A.x was used directly 2 times and indirectly 0 times
+  Main__.B was used directly 1 times and indirectly 0 times
Main__.C was used directly 1 times and indirectly 1 times
Main__.C.y was used directly 1 times and indirectly 0 times
Main__A was used directly 1 times and indirectly 0 times
@@ -152,20 +131,28 @@ We can use the generated table when generating the json output:
$ odoc compile-index --json -o index.json --occurrences all.odoc-occurrences main.odocl


$ cat index.json | jq sort | jq '.[]' -c
-  {"id":[{"kind":"Root","name":"Main"}],"doc":"Handwritten top-level module","kind":{"kind":"Module"},"display":{"url":"Main/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>Handwritten top-level module</p></div></div>"},"occurrences":{"direct":0,"indirect":11}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/index.html#module-A","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">A</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":4,"indirect":6}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/index.html#module-B","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">B</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":1,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"}],"doc":"Handwritten top-level module","kind":{"kind":"Module"},"display":{"url":"Main/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>Handwritten top-level module</p></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/index.html#module-A","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">A</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/index.html#module-B","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">B</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"M"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/B/index.html#module-M","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Y"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/B/index.html#module-Y","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.</span><span class=\"entry-name\">Y</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/B/index.html#module-Z","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.</span><span class=\"entry-name\">Z</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Module","name":"Y"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"Main/B/Z/index.html#module-Y","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.</span><span class=\"entry-name\">Y</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"ModuleType","name":"M"}],"doc":"","kind":{"kind":"ModuleType"},"display":{"url":"Main/A/index.html#module-type-M","html":"<code class=\"entry-kind\">sig</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":2,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"ModuleType","name":"M"}],"doc":"","kind":{"kind":"ModuleType"},"display":{"url":"Main/A/index.html#module-type-M","html":"<code class=\"entry-kind\">sig</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"ModuleType","name":"Y"}],"doc":"","kind":{"kind":"ModuleType"},"display":{"url":"Main/B/index.html#module-type-Y","html":"<code class=\"entry-kind\">sig</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.</span><span class=\"entry-name\">Y</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Type","name":"t"}],"doc":"","kind":{"kind":"TypeDecl","private":false,"manifest":"string","constraints":[]},"display":{"url":"Main/A/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = string</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":1,"indirect":0}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Value","name":"(||>)"}],"doc":"","kind":{"kind":"Value","type":"int -> int -> int"},"display":{"url":"Main/A/index.html#val-(||>)","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">(||&gt;)</span><code class=\"entry-rhs\"> : int -&gt; int -&gt; int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":1,"indirect":0}}
-  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/A/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":2,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Y"},{"kind":"ModuleType","name":"M"}],"doc":"","kind":{"kind":"ModuleType"},"display":{"url":"Main/B/Y/index.html#module-type-M","html":"<code class=\"entry-kind\">sig</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Y.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Module","name":"Y"},{"kind":"ModuleType","name":"M"}],"doc":"","kind":{"kind":"ModuleType"},"display":{"url":"Main/B/Z/Y/index.html#module-type-M","html":"<code class=\"entry-kind\">sig</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.Y.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Type","name":"t"}],"doc":"","kind":{"kind":"TypeDecl","private":false,"manifest":"string","constraints":[]},"display":{"url":"Main/A/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = string</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Y"},{"kind":"Type","name":"t"}],"doc":"","kind":{"kind":"TypeDecl","private":false,"manifest":"string","constraints":[]},"display":{"url":"Main/B/Y/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Y.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = string</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Module","name":"Y"},{"kind":"Type","name":"t"}],"doc":"","kind":{"kind":"TypeDecl","private":false,"manifest":"string","constraints":[]},"display":{"url":"Main/B/Z/Y/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.Y.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = string</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Value","name":"(||>)"}],"doc":"","kind":{"kind":"Value","type":"int -> int -> int"},"display":{"url":"Main/A/index.html#val-(||>)","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">(||&gt;)</span><code class=\"entry-rhs\"> : int -&gt; int -&gt; int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"A"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/A/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.A.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Value","name":"y"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/B/index.html#val-y","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.</span><span class=\"entry-name\">y</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Y"},{"kind":"Value","name":"(||>)"}],"doc":"","kind":{"kind":"Value","type":"int -> int -> int"},"display":{"url":"Main/B/Y/index.html#val-(||>)","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Y.</span><span class=\"entry-name\">(||&gt;)</span><code class=\"entry-rhs\"> : int -&gt; int -&gt; int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Y"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/B/Y/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Y.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
{"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Value","name":"y"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/B/Z/index.html#val-y","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.</span><span class=\"entry-name\">y</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Module","name":"Y"},{"kind":"Value","name":"(||>)"}],"doc":"","kind":{"kind":"Value","type":"int -> int -> int"},"display":{"url":"Main/B/Z/Y/index.html#val-(||>)","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.Y.</span><span class=\"entry-name\">(||&gt;)</span><code class=\"entry-rhs\"> : int -&gt; int -&gt; int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}
+  {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"B"},{"kind":"Module","name":"Z"},{"kind":"Module","name":"Y"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"Main/B/Z/Y/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.B.Z.Y.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"},"occurrences":{"direct":0,"indirect":0}}


$ cat index.json | jq sort | head -n 33
[
@@ -186,7 +173,7 @@ We can use the generated table when generating the json output:
},
"occurrences": {
"direct": 0,
-        "indirect": 11
+        "indirect": 0
}
},
{
@@ -203,17 +190,25 @@ We can use the generated table when generating the json output:
"doc": "",


$ cat index.json | jq -r '.[] | "\(.id | map("\(.kind)-\(.name)") | join(".")), direct: \(.occurrences.direct), indirect: \(.occurrences.indirect)"' | sort
-  Root-Main, direct: 0, indirect: 11
-  Root-Main.Module-A, direct: 4, indirect: 6
-  Root-Main.Module-A.ModuleType-M, direct: 2, indirect: 0
-  Root-Main.Module-A.Type-t, direct: 1, indirect: 0
-  Root-Main.Module-A.Value-(||>), direct: 1, indirect: 0
-  Root-Main.Module-A.Value-x, direct: 2, indirect: 0
-  Root-Main.Module-B, direct: 1, indirect: 0
+  Root-Main, direct: 0, indirect: 0
+  Root-Main.Module-A, direct: 0, indirect: 0
+  Root-Main.Module-A.ModuleType-M, direct: 0, indirect: 0
+  Root-Main.Module-A.Type-t, direct: 0, indirect: 0
+  Root-Main.Module-A.Value-(||>), direct: 0, indirect: 0
+  Root-Main.Module-A.Value-x, direct: 0, indirect: 0
+  Root-Main.Module-B, direct: 0, indirect: 0
Root-Main.Module-B.Module-M, direct: 0, indirect: 0
Root-Main.Module-B.Module-Y, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Y.ModuleType-M, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Y.Type-t, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Y.Value-(||>), direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Y.Value-x, direct: 0, indirect: 0
Root-Main.Module-B.Module-Z, direct: 0, indirect: 0
Root-Main.Module-B.Module-Z.Module-Y, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Z.Module-Y.ModuleType-M, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Z.Module-Y.Type-t, direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Z.Module-Y.Value-(||>), direct: 0, indirect: 0
+  Root-Main.Module-B.Module-Z.Module-Y.Value-x, direct: 0, indirect: 0
Root-Main.Module-B.Module-Z.Value-y, direct: 0, indirect: 0
Root-Main.Module-B.ModuleType-Y, direct: 0, indirect: 0
Root-Main.Module-B.Value-y, direct: 0, indirect: 0
File "test/generators/html/Tag_link.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Tag_link.html _build/default/test/generators/html/Tag_link.html.gen
diff --git a/_build/default/test/generators/html/Tag_link.html b/_build/default/test/generators/html/Tag_link.html.gen
index aa14de5..adc3ec9 100644
--- a/_build/default/test/generators/html/Tag_link.html
+++ b/_build/default/test/generators/html/Tag_link.html.gen
@@ -23,29 +23,29 @@
</div>
<ul class="at-tags">
<li class="deprecated"><span class="at-tag">deprecated</span>
-     <p><a href="#val-foo"><code>foo</code></a></p>
+     <p><a href="#val-foo"><code>foo</code></a>  </p>
</li>
</ul>
<ul class="at-tags">
<li class="parameter"><span class="at-tag">parameter</span>
<span class="value">foo</span>
-     <p><a href="#val-foo"><code>foo</code></a></p>
+     <p><a href="#val-foo"><code>foo</code></a>  </p>
</li>
</ul>
<ul class="at-tags">
<li class="raises"><span class="at-tag">raises</span> <code>Foo</code>
-      <p><a href="#val-foo"><code>foo</code></a></p>
+      <p><a href="#val-foo"><code>foo</code></a>  </p>
</li>
</ul>
<ul class="at-tags">
<li class="returns"><span class="at-tag">returns</span>
-     <p><a href="#val-foo"><code>foo</code></a></p>
+     <p><a href="#val-foo"><code>foo</code></a>  </p>
</li>
</ul>
<ul class="at-tags">
<li class="see"><span class="at-tag">see</span>
<span class="value">foo</span>
-     <p><a href="#val-foo"><code>foo</code></a></p>
+     <p><a href="#val-foo"><code>foo</code></a>  </p>
</li>
</ul>
<ul class="at-tags">
File "test/generators/html/Toplevel_comments-Include_inline'.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Toplevel_comments-Include_inline'.html _build/default/test/generators/html/Toplevel_comments-Include_inline'.html.gen
diff --git a/_build/default/test/generators/html/Toplevel_comments-Include_inline'.html b/_build/default/test/generators/html/Toplevel_comments-Include_inline'.html.gen
index 118322e..4a97ce1 100644
--- a/_build/default/test/generators/html/Toplevel_comments-Include_inline'.html
+++ b/_build/default/test/generators/html/Toplevel_comments-Include_inline'.html.gen
@@ -18,7 +18,7 @@
</h1><p>Doc of <code>Include_inline</code>, part 1.</p>
<p>Doc of <code>Include_inline</code>, part 2.</p>
</header>
-  <div class="odoc-content"><div class="spec-doc"><p>part 3</p></div>
+  <div class="odoc-content"><div class="spec-doc"><p>part 3  </p></div>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
File "test/xref2/labels/labels.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t _build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t.corrected
diff --git a/_build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t b/_build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t.corrected
index 94c893d..f3b124e 100644
--- a/_build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t
+++ b/_build/.sandbox/db94afd06f5642c3d67c0f3df29f8d6b/default/test/xref2/labels/labels.t/run.t.corrected
@@ -1,15 +1,15 @@


$ compile test.mli
-  File "test.mli", line 27, characters 9-13:
+  File "test.mli", line 27, character 363 to line 28, character 13:
Warning: Multiple sections named 'B' found. Please alter one to ensure reference is unambiguous. Locations:
-    File "test.mli", line 3, character 4
-    File "test.mli", line 21, character 4
-  File "test.mli", line 21, characters 4-22:
+    File "test.mli", line 3, character 33
+    File "test.mli", line 23, character 266
+  File "test.mli", line 23, character 266 to line 21, character 22:
Warning: Label 'B' is ambiguous. The other occurences are:
-    File "test.mli", line 3, character 4
-  File "test.mli", line 3, characters 4-24:
+    File "test.mli", line 3, character 33
+  File "test.mli", line 3, characters 33-24:
Warning: Label 'B' is ambiguous. The other occurences are:
-    File "test.mli", line 21, character 4
+    File "test.mli", line 23, character 266


Labels:
Some are not in order because the 'doc' field appears after the rest in the output.
@@ -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"]}}},["`Space",{"`Word":"An"},"`Space",{"`Word":"other"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]]
+  [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},["`Space",{"`Word":"Potentially"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]]
+  [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"A"]}}},["`Space",{"`Word":"First"},"`Space",{"`Word":"label"}]]
+  [{"`Resolved":{"`Identifier":{"`Label":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"B"]}}},["`Space",{"`Word":"Dupplicate"},"`Space",{"`Word":"B"}]]
+  [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"C"]}},["`Space",{"`Word":"First"},"`Space",{"`Word":"label"},"`Space",{"`Word":"of"},"`Space",{"`Word":"M"}]]
+  [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"D"]}},["`Space",{"`Word":"Floating"},"`Space",{"`Word":"label"},"`Space",{"`Word":"in"},"`Space",{"`Word":"M"}]]
+  [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"M"]}},"B"]}},["`Space",{"`Word":"Potentially"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]]
+  [{"`Resolved":{"`Label":[{"`Identifier":{"`Module":[{"`Root":[{"Some":{"`Page":["None","test"]}},"Test"]},"N"]}},"B"]}},["`Space",{"`Word":"An"},"`Space",{"`Word":"other"},"`Space",{"`Word":"conflicting"},"`Space",{"`Word":"label"}]]


$ odoc html-generate --indent -o html test.odocl


@@ -61,13 +61,14 @@ There are two references in N, one should point to a local label and the other t
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-      <ul><li><a href="#B">An other conflicting label</a></li></ul>
+      <ul><li><a href="#B"> An other conflicting label</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-     <h2 id="B"><a href="#B" class="anchor"></a>An other conflicting label</h2>
-     <p><a href="#B" title="B">An other conflicting label</a> 
-      <a href="../M/index.html#B" title="B">Potentially conflicting label</a>
+     <h2 id="B"><a href="#B" class="anchor"></a> An other conflicting label
+     </h2>
+     <p><a href="#B" title="B"> An other conflicting label</a> 
+      <a href="../M/index.html#B" title="B"> Potentially conflicting label</a>
</p>
</div>
</body>
@@ -96,15 +97,15 @@ The second occurence of 'B' in the main page should be disambiguated
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-      <ul><li><a href="#A">First label</a></li>
-       <li><a href="#B">Floating label</a></li>
-       <li><a href="#B_2">Dupplicate B</a></li>
+      <ul><li><a href="#A"> First label</a></li>
+       <li><a href="#B"> Floating label</a></li>
+       <li><a href="#B_2"> Dupplicate B</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-     <h2 id="A"><a href="#A" class="anchor"></a>First label</h2>
-     <h2 id="B"><a href="#B" class="anchor"></a>Floating label</h2>
+     <h2 id="A"><a href="#A" class="anchor"></a> First label</h2>m
+     <h2 id="B"><a href="#B" class="anchor"></a> Floating label</h2>
<div class="odoc-spec">
<div class="spec module anchored" id="module-M">
<a href="#module-M" class="anchor"></a>
@@ -128,15 +129,15 @@ The second occurence of 'B' in the main page should be disambiguated
</span>
</code>
</div>
-     </div><h2 id="B_2"><a href="#B_2" class="anchor"></a>Dupplicate B</h2>
+     </div><h2 id="B_2"><a href="#B_2" class="anchor"></a> Dupplicate B</h2>
<p>Define <code>B</code> again in the same scope.</p>
<p>References to the labels:</p>
-     <p><a href="#A" title="A">First label</a> 
-      <a href="#B" title="B">Dupplicate B</a> 
-      <a href="M/index.html#C" title="C">First label of M</a> 
-      <a href="M/index.html#D" title="D">Floating label in M</a> 
-      <a href="M/index.html#B" title="B">Potentially conflicting label</a>
-       <a href="N/index.html#B" title="B">An other conflicting label</a>
+     <p><a href="#A" title="A"> First label</a> 
+      <a href="#B" title="B"> Dupplicate B</a> 
+      <a href="M/index.html#C" title="C"> First label of M</a> 
+      <a href="M/index.html#D" title="D"> Floating label in M</a> 
+      <a href="M/index.html#B" title="B"> Potentially conflicting label</a>
+       <a href="N/index.html#B" title="B"> An other conflicting label</a>
</p>
</div>
</body>
File "test/generators/html/Toplevel_comments.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Toplevel_comments.html _build/default/test/generators/html/Toplevel_comments.html.gen
diff --git a/_build/default/test/generators/html/Toplevel_comments.html b/_build/default/test/generators/html/Toplevel_comments.html.gen
index 7c20113..1036708 100644
--- a/_build/default/test/generators/html/Toplevel_comments.html
+++ b/_build/default/test/generators/html/Toplevel_comments.html.gen
@@ -14,7 +14,7 @@
<header class="odoc-preamble">
<h1>Module <code><span>Toplevel_comments</span></code></h1>
<p>A doc comment at the beginning of a module is considered to be
-    that module's doc.
+    that  module's doc.
</p>
</header>
<div class="odoc-content">
File "test/pages/medias.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t _build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t.corrected
diff --git a/_build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t b/_build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t.corrected
index 841abe2..ac64c64 100644
--- a/_build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t
+++ b/_build/.sandbox/db22e6e14f9dcd0ffae19f661ff7f924/default/test/pages/medias.t/run.t.corrected
@@ -10,11 +10,11 @@ This will have produced a file called 'page-index.odoc'.


Link (and generate the HTML):
$ odoc link -P pkg1:_odoc/pkg1 _odoc/pkg1/page-index.odoc
-  File "index.mld", line 43, characters 48-64:
+  File "index.mld", line 43, character 48 to line 61, character 64:
Warning: Failed to resolve reference ./module-x Path 'module-x' not found
-  File "index.mld", line 12, characters 28-83:
+  File "index.mld", line 12, character 28 to line 16, character 83:
Warning: Failed to resolve reference ./camezfzeffl.gif Path 'camezfzeffl.gif' not found
-  File "index.mld", line 11, characters 31-53:
+  File "index.mld", line 11, character 31 to line 15, character 53:
Warning: Failed to resolve reference ./caqzdqzdml.gif Path 'caqzdqzdml.gif' not found
$ odoc html-generate -o html --indent _odoc/pkg1/page-index.odocl
$ odoc support-files -o html
@@ -26,18 +26,17 @@ To test visually, indent:
Testing the working references:


$ cat html/pkg1/index.html | grep img
-        <a href="caml.gif" class="img-link">
-         <img src="caml.gif" alt="caml.gif"/>
-        <a href="caml.gif" class="img-link">
-         <img src="caml.gif" alt="With alt text and {b emphasis}"/>
-        <a href="https://picsum.photos/200/300" class="img-link">
-         <img src="https://picsum.photos/200/300" alt="reference"/>
-        <a href="https://picsum.photos/200/300" class="img-link">
-         <img src="https://picsum.photos/200/300"
+      <a href="caml.gif" class="img-link"><img src="caml.gif" alt="caml.gif"/>
+      <a href="caml.gif" class="img-link">
+       <img src="caml.gif" alt="With alt text and {b emphasis}"/>
+      <a href="https://picsum.photos/200/300" class="img-link">
+       <img src="https://picsum.photos/200/300" alt="reference"/>
+      <a href="https://picsum.photos/200/300" class="img-link">
+       <img src="https://picsum.photos/200/300"


$ cat html/pkg1/index.html | grep video
-       <li><a href="#video">Video</a>
-     </div><h2 id="video"><a href="#video" class="anchor"></a>Video</h2>
+       <li><a href="#-video"> Video</a>
+     </div><h2 id="-video"><a href="#-video" class="anchor"></a> Video</h2>
<video src="flower.webm" controls="controls" aria-label="flower.webm">
</video>
<video src="flower.webm" controls="controls"
@@ -49,8 +48,8 @@ Testing the working references:
</video>


$ cat html/pkg1/index.html | grep audio
-       <li><a href="#audio">Audio</a>
-     </ul><h2 id="audio"><a href="#audio" class="anchor"></a>Audio</h2>
+       <li><a href="#-audio"> Audio</a>
+     </div><h2 id="-audio"><a href="#-audio" class="anchor"></a> Audio</h2>
<audio src="Cri_du_chameau.ogg" controls="controls"
</audio>
<audio
@@ -61,9 +60,9 @@ Testing the working references:
Testing the unresolved references:


$ cat html/pkg1/index.html | grep xref-unresolved
-       <div><span class="xref-unresolved">./caqzdqzdml.gif</span></div>
-       <div><span class="xref-unresolved">With alt text and {b emphasis}</span>
-       <div><span class="xref-unresolved">./module-x</span></div>
+     <div><span class="xref-unresolved">./caqzdqzdml.gif</span></div>
+     <div><span class="xref-unresolved">With alt text and {b emphasis}</span>
+     <div><span class="xref-unresolved">./module-x</span></div>


Testing latex and manpages


File "test/generators/man/Tag_link.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Tag_link.3o _build/default/test/generators/man/Tag_link.3o.gen
diff --git a/_build/default/test/generators/man/Tag_link.3o b/_build/default/test/generators/man/Tag_link.3o.gen
index 06227f5..42d1ca8 100644
--- a/_build/default/test/generators/man/Tag_link.3o
+++ b/_build/default/test/generators/man/Tag_link.3o.gen
@@ -14,15 +14,15 @@ Tag_link
\f[CB]val\fR foo : unit
.sp
.fi
-@deprecated: \f[CI]foo\fR
+@deprecated: \f[CI]foo\fR  
.br
-@parameter foo: \f[CI]foo\fR
+@parameter foo: \f[CI]foo\fR  
.br
-@raises Foo: \f[CI]foo\fR
+@raises Foo: \f[CI]foo\fR  
.br
-@returns: \f[CI]foo\fR
+@returns: \f[CI]foo\fR  
.br
-@see foo: \f[CI]foo\fR
+@see foo: \f[CI]foo\fR  
.br
@before 0\.0\.1: \f[CI]foo\fR
.nf
File "test/generators/latex/Tag_link.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Tag_link.tex _build/default/test/generators/latex/Tag_link.tex.gen
diff --git a/_build/default/test/generators/latex/Tag_link.tex b/_build/default/test/generators/latex/Tag_link.tex.gen
index fd728e5..e7643f9 100644
--- a/_build/default/test/generators/latex/Tag_link.tex
+++ b/_build/default/test/generators/latex/Tag_link.tex.gen
@@ -2,27 +2,27 @@
\label{Tag_link-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\\
\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
-\item[{deprecated}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}
+\item[{deprecated}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}  


}\end{description}%
\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
-\item[{parameter foo}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}
+\item[{parameter foo}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}  


}\end{description}%
\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
-\item[{raises \ocamlinlinecode{Foo}}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}
+\item[{raises \ocamlinlinecode{Foo}}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}  


}\end{description}%
\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
-\item[{returns}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}
+\item[{returns}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}  


}\end{description}%
\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
-\item[{see foo}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}
+\item[{see foo}]{\hyperref[Tag_link-val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Tag_link-val-foo}]}  


}\end{description}%
\begin{description}\kern-\topsep
File "test/integration/html_opts.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t _build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t.corrected
diff --git a/_build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t b/_build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t.corrected
index 84828c7..35fd2d4 100644
--- a/_build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t
+++ b/_build/.sandbox/7a1a7dd2b663fcf55a06db94c3f39a6f/default/test/integration/html_opts.t/run.t.corrected
@@ -22,7 +22,7 @@ Generate --as-json embeddable HTML fragment output:


$ odoc html-generate test.odocl -o html --as-json --indent
$ cat html/test/Test/index.html.json
-  {"type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"🏠","href":"../../index.html","kind":"leaf-page"},{"name":"test","href":"../index.html","kind":"page"},{"name":"Test","href":"#","kind":"module"}],"toc":[{"title":"Section 1","href":"#section-1","children":[]},{"title":"Section 2","href":"#section-2","children":[]}],"global_toc":null,"source_anchor":null,"preamble":"<p>Test</p>","content":"<h2 id=\"section-1\"><a href=\"#section-1\" class=\"anchor\"></a>Section 1</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-t\">\u000A  <a href=\"#type-t\" class=\"anchor\"></a>\u000A  <code><span><span class=\"keyword\">type</span> t</span></code>\u000A </div>\u000A</div><h2 id=\"section-2\"><a href=\"#section-2\" class=\"anchor\"></a>Section 2</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-u\">\u000A  <a href=\"#type-u\" class=\"anchor\"></a>\u000A  <code><span><span class=\"keyword\">type</span> u</span></code>\u000A </div>\u000A</div>"}
+  {"type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"🏠","href":"../../index.html","kind":"leaf-page"},{"name":"test","href":"../index.html","kind":"page"},{"name":"Test","href":"#","kind":"module"}],"toc":[{"title":" Section 1","href":"#-section-1","children":[]},{"title":" Section 2","href":"#-section-2","children":[]}],"global_toc":null,"source_anchor":null,"preamble":"<p>Test</p>","content":"<h2 id=\"-section-1\"><a href=\"#-section-1\" class=\"anchor\"></a> Section 1</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-t\">\u000A  <a href=\"#type-t\" class=\"anchor\"></a>\u000A  <code><span><span class=\"keyword\">type</span> t</span></code>\u000A </div>\u000A</div><h2 id=\"-section-2\"><a href=\"#-section-2\" class=\"anchor\"></a> Section 2</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-u\">\u000A  <a href=\"#type-u\" class=\"anchor\"></a>\u000A  <code><span><span class=\"keyword\">type</span> u</span></code>\u000A </div>\u000A</div>"}


$ odoc html-targets test.odocl -o html --as-json --indent
html/test/Test/index.html.json
File "test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html _build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html.gen
diff --git a/_build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html b/_build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html.gen
index c81232a..cf2bf22 100644
--- a/_build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html
+++ b/_build/default/test/generators/html/Toplevel_comments-module-type-Include_inline_T'.html.gen
@@ -19,7 +19,7 @@
</h1><p>Doc of <code>Include_inline_T'</code>, part 1.</p>
<p>Doc of <code>Include_inline_T'</code>, part 2.</p>
</header>
-  <div class="odoc-content"><div class="spec-doc"><p>part 3</p></div>
+  <div class="odoc-content"><div class="spec-doc"><p>part 3  </p></div>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
File "test/integration/compile.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t _build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t.corrected
diff --git a/_build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t b/_build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t.corrected
index ea96ca4..211bdca 100644
--- a/_build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t
+++ b/_build/.sandbox/fd8d15eef68720324c14ebf7bbafd5af/default/test/integration/compile.t/run.t.corrected
@@ -4,169 +4,155 @@ Various tests for the 'compile' command.


$ ocamlc -bin-annot -c ast.mli
$ odoc compile --package foo ast.cmti
-  File "ast.mli", line 1, characters 4-17:
+  File "ast.mli", line 1, characters 7-20:
Warning: Unknown tag '@TxtAttribute'.
-  File "ast.mli", line 4, characters 4-21:
+  File "ast.mli", line 4, characters 42-59:
Warning: Unknown tag '@ValueDeclaration'.
-  File "ast.mli", line 6, characters 4-21:
+  File "ast.mli", line 6, characters 68-85:
Warning: Unknown tag '@ValueDeclaration'.
-  File "ast.mli", line 8, characters 4-21:
+  File "ast.mli", line 8, characters 106-123:
Warning: Unknown tag '@ValueDeclaration'.
-  File "ast.mli", line 11, characters 4-20:
+  File "ast.mli", line 11, characters 146-162:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 13, characters 4-20:
+  File "ast.mli", line 13, characters 171-187:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 14, characters 16-39:
+  File "ast.mli", line 14, characters 219-242:
Warning: Unknown tag '@ConstructorDeclaration'.
-  File "ast.mli", line 15, characters 16-39:
+  File "ast.mli", line 15, characters 262-285:
Warning: Unknown tag '@ConstructorDeclaration'.
-  File "ast.mli", line 22, characters 4-20:
+  File "ast.mli", line 22, characters 307-323:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 24, characters 15-32:
+  File "ast.mli", line 24, characters 365-382:
Warning: Unknown tag '@LabelDeclaration'.
-  File "ast.mli", line 25, characters 16-33:
+  File "ast.mli", line 25, characters 403-420:
Warning: Unknown tag '@LabelDeclaration'.
-  File "ast.mli", line 29, characters 4-20:
+  File "ast.mli", line 29, characters 432-448:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 31, characters 4-18:
+  File "ast.mli", line 31, characters 457-471:
Warning: Unknown tag '@TypeExtension'.
-  File "ast.mli", line 32, characters 17-27:
+  File "ast.mli", line 32, characters 505-515:
Warning: Unknown tag '@Extension'.
-  File "ast.mli", line 33, characters 17-27:
+  File "ast.mli", line 33, characters 536-546:
Warning: Unknown tag '@Extension'.
-  File "ast.mli", line 35, characters 4-26:
+  File "ast.mli", line 35, characters 542-564:
Warning: Unknown tag '@ModuleTypeDeclaration'.
-  File "ast.mli", line 37, characters 6-19:
+  File "ast.mli", line 37, characters 597-610:
Warning: Unknown tag '@TxtAttribute'.
-  File "ast.mli", line 40, characters 6-22:
+  File "ast.mli", line 40, characters 636-652:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 43, characters 4-22:
+  File "ast.mli", line 43, characters 663-681:
Warning: Unknown tag '@ModuleDeclaration'.
-  File "ast.mli", line 45, characters 6-19:
+  File "ast.mli", line 45, characters 708-721:
Warning: Unknown tag '@TxtAttribute'.
-  File "ast.mli", line 47, characters 6-24:
+  File "ast.mli", line 47, characters 732-750:
Warning: Unknown tag '@ModuleDeclaration'.
-  File "ast.mli", line 49, characters 8-21:
+  File "ast.mli", line 49, characters 781-794:
Warning: Unknown tag '@TxtAttribute'.
-  File "ast.mli", line 52, characters 8-24:
+  File "ast.mli", line 52, characters 824-840:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 57, characters 4-14:
+  File "ast.mli", line 57, characters 872-882:
Warning: Unknown tag '@Exception'.
-  File "ast.mli", line 60, characters 4-11:
+  File "ast.mli", line 60, characters 899-906:
Warning: Unknown tag '@Hidden'.
-  File "ast.mli", line 63, characters 4-23:
+  File "ast.mli", line 63, characters 923-942:
Warning: Unknown tag '@IncludeDescription'.
-  File "ast.mli", line 68, characters 6-22:
+  File "ast.mli", line 68, characters 1005-1021:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 65, characters 6-19:
+  File "ast.mli", line 65, characters 966-979:
Warning: Unknown tag '@TxtAttribute'.
-  File "ast.mli", line 68, characters 6-22:
+  File "ast.mli", line 68, characters 1005-1021:
Warning: Unknown tag '@TypeDeclaration'.
-  File "ast.mli", line 71, characters 4-10:
+  File "ast.mli", line 71, characters 1032-1038:
Warning: Unknown tag '@Class'.
-  File "ast.mli", line 74, characters 6-13:
+  File "ast.mli", line 74, characters 1096-1103:
Warning: Unknown tag '@Method'.


Test different parsing errors.


$ ocamlc -bin-annot -c parser_errors.mli
$ odoc compile --package foo parser_errors.cmti
-  File "parser_errors.mli", line 1, characters 4-26:
+  File "parser_errors.mli", line 1, characters 7-29:
Warning: '{x This is bad markup}': bad markup.
Suggestion: did you mean '{!x This is bad markup}' or '[x This is bad markup]'?
-  File "parser_errors.mli", line 4, characters 4-24:
+  File "parser_errors.mli", line 4, characters 50-24:
Warning: '9': bad heading level (0-5 allowed).
-  File "parser_errors.mli", line 10, characters 8-11:
-  Warning: '{li ...}' should be followed by space, a tab, or a new line.
-  File "parser_errors.mli", line 13, characters 4-7:
+  File "parser_errors.mli", line 13, characters 4-20:
Warning: '{li ...}' (list item) is not allowed in top-level text.
-  Suggestion: move '{li ...}' into '{ul ...}' (bulleted list), or use '-' (bulleted list item).
-  File "parser_errors.mli", line 13, characters 19-20:
-  Warning: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 16, characters 4-6:
+  Suggestion: Move '{li ...}' (list item) into '{ol ...}' (numbered list) or '{ul ...}' (bulleted list)
+  File "parser_errors.mli", line 16, characters 251-253:
Warning: '{v' should be followed by whitespace.
-  File "parser_errors.mli", line 19, characters 37-39:
+  File "parser_errors.mli", line 19, characters 340-342:
Warning: 'v}' should be preceded by whitespace.
-  File "parser_errors.mli", line 22, characters 4-5:
+  File "parser_errors.mli", line 22, characters 363-364:
Warning: Stray '@'.
-  File "parser_errors.mli", line 28, characters 4-11:
+  File "parser_errors.mli", line 28, characters 446-453:
Warning: '@before' expects version number on the same line.
-  File "parser_errors.mli", line 31, characters 4-10:
+  File "parser_errors.mli", line 31, characters 474-480:
Warning: '@param' expects parameter name on the same line.
-  File "parser_errors.mli", line 34, characters 4-10:
+  File "parser_errors.mli", line 34, characters 501-507:
Warning: '@raise' expects exception constructor on the same line.
File "parser_errors.mli", line 34, characters 4-4:
Warning: Identifier in reference should not be empty.
-  File "parser_errors.mli", line 37, characters 4-11:
+  File "parser_errors.mli", line 37, characters 529-536:
Warning: '@raises' expects exception constructor on the same line.
File "parser_errors.mli", line 37, characters 4-4:
Warning: Identifier in reference should not be empty.
-  File "parser_errors.mli", line 40, characters 4-8:
+  File "parser_errors.mli", line 40, characters 558-562:
Warning: '@see' should be followed by <url>, 'file', or "document title".
-  File "parser_errors.mli", line 43, characters 4-15:
+  File "parser_errors.mli", line 43, characters 583-594:
Warning: Unknown tag '@UnknownTag'.
-  File "parser_errors.mli", line 46, characters 4-5:
-  Warning: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 49, characters 4-5:
+  File "parser_errors.mli", line 46, characters 3-5:
+  Warning: ''}'': bad markup.
+  File "parser_errors.mli", line 49, characters 646-647:
Warning: Unpaired ']' (end of code).
Suggestion: try '\]'.
-  File "parser_errors.mli", line 53, characters 4-5:
-  Warning: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 56, characters 4-18:
+  File "parser_errors.mli", line 53, characters 0-5:
+  Warning: ''}'': bad markup.
+  File "parser_errors.mli", line 56, characters 751-765:
Warning: '{x bad markup}': bad markup.
Suggestion: did you mean '{!x bad markup}' or '[x bad markup]'?


With warn-error enabled.


$ odoc compile --package foo --warn-error parser_errors.cmti
-  File "parser_errors.mli", line 1, characters 4-26:
+  File "parser_errors.mli", line 1, characters 7-29:
Error: '{x This is bad markup}': bad markup.
Suggestion: did you mean '{!x This is bad markup}' or '[x This is bad markup]'?
-  File "parser_errors.mli", line 4, characters 4-24:
+  File "parser_errors.mli", line 4, characters 50-24:
Error: '9': bad heading level (0-5 allowed).
-  File "parser_errors.mli", line 10, characters 8-11:
-  Error: '{li ...}' should be followed by space, a tab, or a new line.
-  File "parser_errors.mli", line 13, characters 4-7:
+  File "parser_errors.mli", line 13, characters 4-20:
Error: '{li ...}' (list item) is not allowed in top-level text.
-  Suggestion: move '{li ...}' into '{ul ...}' (bulleted list), or use '-' (bulleted list item).
-  File "parser_errors.mli", line 13, characters 19-20:
-  Error: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 16, characters 4-6:
+  Suggestion: Move '{li ...}' (list item) into '{ol ...}' (numbered list) or '{ul ...}' (bulleted list)
+  File "parser_errors.mli", line 16, characters 251-253:
Error: '{v' should be followed by whitespace.
-  File "parser_errors.mli", line 19, characters 37-39:
+  File "parser_errors.mli", line 19, characters 340-342:
Error: 'v}' should be preceded by whitespace.
-  File "parser_errors.mli", line 22, characters 4-5:
+  File "parser_errors.mli", line 22, characters 363-364:
Error: Stray '@'.
-  File "parser_errors.mli", line 28, characters 4-11:
+  File "parser_errors.mli", line 28, characters 446-453:
Error: '@before' expects version number on the same line.
-  File "parser_errors.mli", line 31, characters 4-10:
+  File "parser_errors.mli", line 31, characters 474-480:
Error: '@param' expects parameter name on the same line.
-  File "parser_errors.mli", line 34, characters 4-10:
+  File "parser_errors.mli", line 34, characters 501-507:
Error: '@raise' expects exception constructor on the same line.
File "parser_errors.mli", line 34, characters 4-4:
Error: Identifier in reference should not be empty.
-  File "parser_errors.mli", line 37, characters 4-11:
+  File "parser_errors.mli", line 37, characters 529-536:
Error: '@raises' expects exception constructor on the same line.
File "parser_errors.mli", line 37, characters 4-4:
Error: Identifier in reference should not be empty.
-  File "parser_errors.mli", line 40, characters 4-8:
+  File "parser_errors.mli", line 40, characters 558-562:
Error: '@see' should be followed by <url>, 'file', or "document title".
-  File "parser_errors.mli", line 43, characters 4-15:
+  File "parser_errors.mli", line 43, characters 583-594:
Error: Unknown tag '@UnknownTag'.
-  File "parser_errors.mli", line 46, characters 4-5:
-  Error: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 49, characters 4-5:
+  File "parser_errors.mli", line 46, characters 3-5:
+  Error: ''}'': bad markup.
+  File "parser_errors.mli", line 49, characters 646-647:
Error: Unpaired ']' (end of code).
Suggestion: try '\]'.
-  File "parser_errors.mli", line 53, characters 4-5:
-  Error: Unpaired '}' (end of markup).
-  Suggestion: try '\}'.
-  File "parser_errors.mli", line 56, characters 4-18:
+  File "parser_errors.mli", line 53, characters 0-5:
+  Error: ''}'': bad markup.
+  File "parser_errors.mli", line 56, characters 751-765:
Error: '{x bad markup}': bad markup.
Suggestion: did you mean '{!x bad markup}' or '[x bad markup]'?
ERROR: Warnings have been generated.
@@ -182,11 +168,11 @@ Check line numbers for errors in a '.mld' file.
$ odoc compile line_numbers.mld
File "line_numbers.mld", line 2, characters 0-4:
Warning: '{[...]}' (code block) should not be empty.
-  File "line_numbers.mld", line 8, characters 0-12:
-  Warning: '{Bad Markup}': bad markup.
-  Suggestion: did you mean '{!Bad Markup}' or '[Bad Markup]'?
File "line_numbers.mld", line 32, characters 0-1:
Warning: '{': bad markup.
Suggestion: escape the brace with '\{'.
-  File "line_numbers.mld", line 16, characters 0-11:
+  File "line_numbers.mld", line 8, characters 0-12:
+  Warning: '{Bad Markup}': bad markup.
+  Suggestion: did you mean '{!Bad Markup}' or '[Bad Markup]'?
+  File "line_numbers.mld", line 16, character 0 to line 18, character 11:
Warning: '6': bad heading level (0-5 allowed).
File "test/generators/html/Toplevel_comments-Ref_in_synopsis.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html _build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html.gen
diff --git a/_build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html b/_build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html.gen
index 2f41147..71acd00 100644
--- a/_build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html
+++ b/_build/default/test/generators/html/Toplevel_comments-Ref_in_synopsis.html.gen
@@ -17,7 +17,7 @@
<h1>Module <code><span>Toplevel_comments.Ref_in_synopsis</span></code>
</h1><p><a href="#type-t"><code>t</code></a>.</p>
<p>This reference should resolve in the context of this module, even
-     when used as a synopsis.
+     when  used as a synopsis.
</p>
</header>
<div class="odoc-content">
File "test/generators/html/Toplevel_comments-Comments_on_open.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Toplevel_comments-Comments_on_open.html _build/default/test/generators/html/Toplevel_comments-Comments_on_open.html.gen
diff --git a/_build/default/test/generators/html/Toplevel_comments-Comments_on_open.html b/_build/default/test/generators/html/Toplevel_comments-Comments_on_open.html.gen
index 8fea40f..0f2638d 100644
--- a/_build/default/test/generators/html/Toplevel_comments-Comments_on_open.html
+++ b/_build/default/test/generators/html/Toplevel_comments-Comments_on_open.html.gen
@@ -19,7 +19,7 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#sec">Section</a></li></ul>
+    <ul><li><a href="#sec"> Section</a></li></ul>
</nav>
</div>
<div class="odoc-content">
@@ -35,9 +35,9 @@
</span>
</code>
</div>
-   </div><h3 id="sec"><a href="#sec" class="anchor"></a>Section</h3>
-   <p>Comments attached to open are treated as floating comments. Referencing
-     <a href="#sec" title="sec">Section</a> 
+   </div><h3 id="sec"><a href="#sec" class="anchor"></a> Section</h3>
+   <p>Comments attached to open are treated as floating comments.  
+    Referencing <a href="#sec" title="sec"> Section</a> 
<a href="Toplevel_comments-Comments_on_open-M.html#type-t">
<code>M.t</code>
</a> works
File "test/generators/latex/Toplevel_comments.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Toplevel_comments.tex _build/default/test/generators/latex/Toplevel_comments.tex.gen
diff --git a/_build/default/test/generators/latex/Toplevel_comments.tex b/_build/default/test/generators/latex/Toplevel_comments.tex.gen
index 6c9f4a8..613078f 100644
--- a/_build/default/test/generators/latex/Toplevel_comments.tex
+++ b/_build/default/test/generators/latex/Toplevel_comments.tex.gen
@@ -1,5 +1,5 @@
\section{Module \ocamlinlinecode{Toplevel\_\allowbreak{}comments}}\label{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.


\label{Toplevel_comments-module-type-T}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Toplevel_comments-module-type-T]{\ocamlinlinecode{T}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Toplevel_comments-module-type-T-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
\end{ocamlindent}%
@@ -9,7 +9,7 @@ A doc comment at the beginning of a module is considered to be that module's doc
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Doc of \ocamlinlinecode{T}, part 2.\end{ocamlindent}%
\medbreak
-\label{Toplevel_comments-module-Include_inline'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Toplevel_comments-Include_inline']{\ocamlinlinecode{Include\_\allowbreak{}inline'}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}part 3\ocamltag{keyword}{include} \hyperref[Toplevel_comments-module-type-T]{\ocamlinlinecode{T}}\label{Toplevel_comments-Include_inline'-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
+\label{Toplevel_comments-module-Include_inline'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Toplevel_comments-Include_inline']{\ocamlinlinecode{Include\_\allowbreak{}inline'}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}part 3  \ocamltag{keyword}{include} \hyperref[Toplevel_comments-module-type-T]{\ocamlinlinecode{T}}\label{Toplevel_comments-Include_inline'-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Doc of \ocamlinlinecode{Include\_\allowbreak{}inline}, part 1.\end{ocamlindent}%
\medbreak
@@ -17,7 +17,7 @@ A doc comment at the beginning of a module is considered to be that module's doc
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Doc of \ocamlinlinecode{T}, part 2.\end{ocamlindent}%
\medbreak
-\label{Toplevel_comments-module-type-Include_inline_T'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Toplevel_comments-module-type-Include_inline_T']{\ocamlinlinecode{Include\_\allowbreak{}inline\_\allowbreak{}T'}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}part 3\ocamltag{keyword}{include} \hyperref[Toplevel_comments-module-type-T]{\ocamlinlinecode{T}}\label{Toplevel_comments-module-type-Include_inline_T'-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
+\label{Toplevel_comments-module-type-Include_inline_T'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Toplevel_comments-module-type-Include_inline_T']{\ocamlinlinecode{Include\_\allowbreak{}inline\_\allowbreak{}T'}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}part 3  \ocamltag{keyword}{include} \hyperref[Toplevel_comments-module-type-T]{\ocamlinlinecode{T}}\label{Toplevel_comments-module-type-Include_inline_T'-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Doc of \ocamlinlinecode{Include\_\allowbreak{}inline\_\allowbreak{}T'}, part 1.\end{ocamlindent}%
\medbreak
@@ -46,8 +46,8 @@ A doc comment at the beginning of a module is considered to be that module's doc
\label{Toplevel_comments-module-Comments_on_open}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Toplevel_comments-Comments_on_open]{\ocamlinlinecode{Comments\_\allowbreak{}on\_\allowbreak{}open}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Toplevel_comments-Comments_on_open-module-M}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Toplevel_comments-Comments_on_open-M]{\ocamlinlinecode{M}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Toplevel_comments-Comments_on_open-M-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
-\subsubsection{Section\label{sec}}%
-Comments attached to open are treated as floating comments. Referencing \hyperref[Toplevel_comments-Comments_on_open-sec]{\ocamlinlinecode{Section}[p\pageref*{Toplevel_comments-Comments_on_open-sec}]} \hyperref[Toplevel_comments-Comments_on_open-M-type-t]{\ocamlinlinecode{\ocamlinlinecode{M.\allowbreak{}t}}[p\pageref*{Toplevel_comments-Comments_on_open-M-type-t}]} works
+\subsubsection{ Section\label{sec}}%
+Comments attached to open are treated as floating comments.  Referencing \hyperref[Toplevel_comments-Comments_on_open-sec]{\ocamlinlinecode{ Section}[p\pageref*{Toplevel_comments-Comments_on_open-sec}]} \hyperref[Toplevel_comments-Comments_on_open-M-type-t]{\ocamlinlinecode{\ocamlinlinecode{M.\allowbreak{}t}}[p\pageref*{Toplevel_comments-Comments_on_open-M-type-t}]} works


\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
File "test/generators/man/Toplevel_comments.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Toplevel_comments.3o _build/default/test/generators/man/Toplevel_comments.3o.gen
diff --git a/_build/default/test/generators/man/Toplevel_comments.3o b/_build/default/test/generators/man/Toplevel_comments.3o.gen
index cd9b427..0fac6b2 100644
--- a/_build/default/test/generators/man/Toplevel_comments.3o
+++ b/_build/default/test/generators/man/Toplevel_comments.3o.gen
@@ -9,7 +9,7 @@ Toplevel_comments
.in
.sp
.fi
-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\.
.nf
.SH Documentation
.sp
File "test/generators/man/Toplevel_comments.Ref_in_synopsis.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o _build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o.gen
diff --git a/_build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o b/_build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o.gen
index a9fa105..1b5d4c5 100644
--- a/_build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o
+++ b/_build/default/test/generators/man/Toplevel_comments.Ref_in_synopsis.3o.gen
@@ -13,7 +13,7 @@ Toplevel_comments\.Ref_in_synopsis
.nf
.sp
.fi
-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\.
.nf
.SH Documentation
.sp
File "test/generators/html/Stop.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Stop.html _build/default/test/generators/html/Stop.html.gen
diff --git a/_build/default/test/generators/html/Stop.html b/_build/default/test/generators/html/Stop.html.gen
index 354ce25..dd48e8b 100644
--- a/_build/default/test/generators/html/Stop.html
+++ b/_build/default/test/generators/html/Stop.html.gen
@@ -23,15 +23,15 @@
</div><div class="spec-doc"><p>This is normal commented text.</p></div>
</div>
<p>The next value is <code>bar</code>, and it should be missing from
-     the documentation. There is also an entire module, <code>M</code>
-    , 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 documentation.  There is also an entire module, <code>M</code>
+    , 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.
</p><p>Documentation is on again.</p>
<p>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.
+     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.
</p>
<div class="odoc-spec">
<div class="spec module anchored" id="module-N">
@@ -51,9 +51,9 @@
<code><span><span class="keyword">val</span> lol : int</span></code>
</div>
</div>
-   <p>The first comment can also be a stop-comment. The test case 
+   <p>The first comment can also be a stop-comment. The test case  
<code>stop_first_comment.mli</code> is testing the same thing but
-     at the toplevel. We should see <code>bar</code> inside 
+     at the toplevel. We  should see <code>bar</code> inside 
<a href="Stop-O.html"><code>O</code></a>.
</p>
<div class="odoc-spec">
File "test/generators/man/Toplevel_comments.Comments_on_open.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o _build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o.gen
diff --git a/_build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o b/_build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o.gen
index 17d04cb..21ce1af 100644
--- a/_build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o
+++ b/_build/default/test/generators/man/Toplevel_comments.Comments_on_open.3o.gen
@@ -14,10 +14,10 @@ Toplevel_comments\.Comments_on_open
\f[CB]module\fR M : \f[CB]sig\fR \.\.\. \f[CB]end\fR
.sp
.in 4
-\fB1\.1 Section\fR
+\fB1\.1  Section\fR
.in
.sp
.fi
-Comments attached to open are treated as floating comments\. Referencing \f[CI]Section\fR \f[CI]M\.t\fR works
+Comments attached to open are treated as floating comments\.  Referencing \f[CI] Section\fR \f[CI]M\.t\fR works
.nf


File "test/integration/suppress_warnings.t/run.t", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t _build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t.corrected
diff --git a/_build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t b/_build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t.corrected
index 35cbbac..5394e65 100644
--- a/_build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t
+++ b/_build/.sandbox/ceec3e87334015b7ca717743f7e5d5dd/default/test/integration/suppress_warnings.t/run.t.corrected
@@ -4,7 +4,7 @@
$ odoc compile module_with_errors.cmti
$ odoc compile main.cmti -I .
$ odoc link main.odoc
-  File "module_with_errors.mli", line 7, characters 6-10:
+  File "module_with_errors.mli", line 7, characters 95-10:
Warning: While resolving the expansion of include at File "main.mli", line 1, character 0
Reference to 't' is ambiguous. Please specify its kind: section-t, type-t.
$ odoc html-generate -o html main.odocl
File "test/generators/latex/Stop.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Stop.tex _build/default/test/generators/latex/Stop.tex.gen
diff --git a/_build/default/test/generators/latex/Stop.tex b/_build/default/test/generators/latex/Stop.tex.gen
index 73b6517..9256868 100644
--- a/_build/default/test/generators/latex/Stop.tex
+++ b/_build/default/test/generators/latex/Stop.tex.gen
@@ -3,17 +3,17 @@ This test cases exercises stop comments.


\label{Stop-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : int}\begin{ocamlindent}This is normal commented text.\end{ocamlindent}%
\medbreak
-The next value is \ocamlinlinecode{bar}, and it should be missing from the documentation. There is also an entire module, \ocamlinlinecode{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 \ocamlinlinecode{bar}, and it should be missing from the documentation.  There is also an entire module, \ocamlinlinecode{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.


\label{Stop-module-N}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Stop-N]{\ocamlinlinecode{N}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Stop-N-val-quux}\ocamlcodefragment{\ocamltag{keyword}{val} quux : int}\\
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{Stop-val-lol}\ocamlcodefragment{\ocamltag{keyword}{val} lol : int}\\
-The first comment can also be a stop-comment. The test case \ocamlinlinecode{stop\_\allowbreak{}first\_\allowbreak{}comment.\allowbreak{}mli} is testing the same thing but at the toplevel. We should see \ocamlinlinecode{bar} inside \hyperref[Stop-O]{\ocamlinlinecode{\ocamlinlinecode{O}}[p\pageref*{Stop-O}]}.
+The first comment can also be a stop-comment. The test case  \ocamlinlinecode{stop\_\allowbreak{}first\_\allowbreak{}comment.\allowbreak{}mli} is testing the same thing but at the toplevel. We  should see \ocamlinlinecode{bar} inside \hyperref[Stop-O]{\ocamlinlinecode{\ocamlinlinecode{O}}[p\pageref*{Stop-O}]}.


\label{Stop-module-O}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Stop-O]{\ocamlinlinecode{O}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Stop-O-val-bar}\ocamlcodefragment{\ocamltag{keyword}{val} bar : int}\\
\end{ocamlindent}%
File "test/generators/man/Stop.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Stop.3o _build/default/test/generators/man/Stop.3o.gen
diff --git a/_build/default/test/generators/man/Stop.3o b/_build/default/test/generators/man/Stop.3o.gen
index a7fb7bd..9fd62a9 100644
--- a/_build/default/test/generators/man/Stop.3o
+++ b/_build/default/test/generators/man/Stop.3o.gen
@@ -22,13 +22,13 @@ This is normal commented text\.
.nf
.sp
.fi
-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\.
.nf
.sp
.fi
Documentation is on again\.
.sp
-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\.
.nf
.sp
\f[CB]module\fR N : \f[CB]sig\fR \.\.\. \f[CB]end\fR
@@ -36,7 +36,7 @@ Now, we have a nested module, and it has a stop comment between its two items\.
\f[CB]val\fR lol : int
.sp
.fi
-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 \f[CI]O\fR\.
+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 \f[CI]O\fR\.
.nf
.sp
\f[CB]module\fR O : \f[CB]sig\fR \.\.\. \f[CB]end\fR
File "test/generators/html/Nested.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested.html _build/default/test/generators/html/Nested.html.gen
diff --git a/_build/default/test/generators/html/Nested.html b/_build/default/test/generators/html/Nested.html.gen
index a92bb0f..95cc62f 100644
--- a/_build/default/test/generators/html/Nested.html
+++ b/_build/default/test/generators/html/Nested.html.gen
@@ -17,15 +17,15 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#module">Module</a></li>
-     <li><a href="#module-type">Module type</a></li>
-     <li><a href="#functor">Functor</a></li>
-     <li><a href="#class">Class</a></li>
+    <ul><li><a href="#-module"> Module</a></li>
+     <li><a href="#-module-type"> Module type</a></li>
+     <li><a href="#-functor"> Functor</a></li>
+     <li><a href="#-class"> Class</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="module"><a href="#module" class="anchor"></a>Module</h2>
+   <h2 id="-module"><a href="#-module" class="anchor"></a> Module</h2>
<div class="odoc-spec">
<div class="spec module anchored" id="module-X">
<a href="#module-X" class="anchor"></a>
@@ -38,7 +38,8 @@
</code>
</div><div class="spec-doc"><p>This is module X.</p></div>
</div>
-   <h2 id="module-type"><a href="#module-type" class="anchor"></a>Module type
+   <h2 id="-module-type"><a href="#-module-type" class="anchor"></a> 
+    Module type
</h2>
<div class="odoc-spec">
<div class="spec module-type anchored" id="module-type-Y">
@@ -53,7 +54,8 @@
</span>
</code>
</div><div class="spec-doc"><p>This is module type Y.</p></div>
-   </div><h2 id="functor"><a href="#functor" class="anchor"></a>Functor</h2>
+   </div>
+   <h2 id="-functor"><a href="#-functor" class="anchor"></a> Functor</h2>
<div class="odoc-spec">
<div class="spec module anchored" id="module-F">
<a href="#module-F" class="anchor"></a>
@@ -69,7 +71,7 @@
</span>
</code>
</div><div class="spec-doc"><p>This is a functor F.</p></div>
-   </div><h2 id="class"><a href="#class" class="anchor"></a>Class</h2>
+   </div><h2 id="-class"><a href="#-class" class="anchor"></a> Class</h2>
<div class="odoc-spec">
<div class="spec class anchored" id="class-z">
<a href="#class-z" class="anchor"></a>
File "test/generators/html/Nested-module-type-Y.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-module-type-Y.html _build/default/test/generators/html/Nested-module-type-Y.html.gen
diff --git a/_build/default/test/generators/html/Nested-module-type-Y.html b/_build/default/test/generators/html/Nested-module-type-Y.html.gen
index be6fbb1..0344709 100644
--- a/_build/default/test/generators/html/Nested-module-type-Y.html
+++ b/_build/default/test/generators/html/Nested-module-type-Y.html.gen
@@ -18,19 +18,19 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#type">Type</a></li>
-     <li><a href="#values">Values</a></li>
+    <ul><li><a href="#-type"> Type</a></li>
+     <li><a href="#-values"> Values</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="type"><a href="#type" class="anchor"></a>Type</h2>
+   <h2 id="-type"><a href="#-type" class="anchor"></a> Type</h2>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
<code><span><span class="keyword">type</span> t</span></code>
</div><div class="spec-doc"><p>Some type.</p></div>
-   </div><h2 id="values"><a href="#values" class="anchor"></a>Values</h2>
+   </div><h2 id="-values"><a href="#-values" class="anchor"></a> Values</h2>
<div class="odoc-spec">
<div class="spec value anchored" id="val-y">
<a href="#val-y" class="anchor"></a>
File "test/generators/html/Nested-X.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-X.html _build/default/test/generators/html/Nested-X.html.gen
diff --git a/_build/default/test/generators/html/Nested-X.html b/_build/default/test/generators/html/Nested-X.html.gen
index 2a37236..047d0f0 100644
--- a/_build/default/test/generators/html/Nested-X.html
+++ b/_build/default/test/generators/html/Nested-X.html.gen
@@ -18,19 +18,19 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#type">Type</a></li>
-     <li><a href="#values">Values</a></li>
+    <ul><li><a href="#-type"> Type</a></li>
+     <li><a href="#-values"> Values</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="type"><a href="#type" class="anchor"></a>Type</h2>
+   <h2 id="-type"><a href="#-type" class="anchor"></a> Type</h2>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
<code><span><span class="keyword">type</span> t</span></code>
</div><div class="spec-doc"><p>Some type.</p></div>
-   </div><h2 id="values"><a href="#values" class="anchor"></a>Values</h2>
+   </div><h2 id="-values"><a href="#-values" class="anchor"></a> Values</h2>
<div class="odoc-spec">
<div class="spec value anchored" id="val-x">
<a href="#val-x" class="anchor"></a>
File "test/generators/html/Nested-F-argument-1-Arg1.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-F-argument-1-Arg1.html _build/default/test/generators/html/Nested-F-argument-1-Arg1.html.gen
diff --git a/_build/default/test/generators/html/Nested-F-argument-1-Arg1.html b/_build/default/test/generators/html/Nested-F-argument-1-Arg1.html.gen
index 0c739d5..7c75efd 100644
--- a/_build/default/test/generators/html/Nested-F-argument-1-Arg1.html
+++ b/_build/default/test/generators/html/Nested-F-argument-1-Arg1.html.gen
@@ -17,19 +17,19 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#type">Type</a></li>
-     <li><a href="#values">Values</a></li>
+    <ul><li><a href="#-type"> Type</a></li>
+     <li><a href="#-values"> Values</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="type"><a href="#type" class="anchor"></a>Type</h2>
+   <h2 id="-type"><a href="#-type" class="anchor"></a> Type</h2>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
<code><span><span class="keyword">type</span> t</span></code>
</div><div class="spec-doc"><p>Some type.</p></div>
-   </div><h2 id="values"><a href="#values" class="anchor"></a>Values</h2>
+   </div><h2 id="-values"><a href="#-values" class="anchor"></a> Values</h2>
<div class="odoc-spec">
<div class="spec value anchored" id="val-y">
<a href="#val-y" class="anchor"></a>
File "test/generators/html/Nested-F.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-F.html _build/default/test/generators/html/Nested-F.html.gen
diff --git a/_build/default/test/generators/html/Nested-F.html b/_build/default/test/generators/html/Nested-F.html.gen
index 8e69578..9f0455d 100644
--- a/_build/default/test/generators/html/Nested-F.html
+++ b/_build/default/test/generators/html/Nested-F.html.gen
@@ -20,7 +20,7 @@
<nav class="odoc-toc odoc-local-toc">
<ul><li><a href="#parameters">Parameters</a></li>
<li><a href="#signature">Signature</a></li>
-     <li><a href="#type">Type</a></li>
+     <li><a href="#-type"> Type</a></li>
</ul>
</nav>
</div>
@@ -48,7 +48,7 @@
</div>
</div>
<h2 id="signature"><a href="#signature" class="anchor"></a>Signature</h2>
-   <h2 id="type"><a href="#type" class="anchor"></a>Type</h2>
+   <h2 id="-type"><a href="#-type" class="anchor"></a> Type</h2>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
File "test/generators/html/Nested-F-argument-2-Arg2.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-F-argument-2-Arg2.html _build/default/test/generators/html/Nested-F-argument-2-Arg2.html.gen
diff --git a/_build/default/test/generators/html/Nested-F-argument-2-Arg2.html b/_build/default/test/generators/html/Nested-F-argument-2-Arg2.html.gen
index 7ac4e9b..3f7196a 100644
--- a/_build/default/test/generators/html/Nested-F-argument-2-Arg2.html
+++ b/_build/default/test/generators/html/Nested-F-argument-2-Arg2.html.gen
@@ -17,11 +17,11 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#type">Type</a></li></ul>
+    <ul><li><a href="#-type"> Type</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="type"><a href="#type" class="anchor"></a>Type</h2>
+   <h2 id="-type"><a href="#-type" class="anchor"></a> Type</h2>
<div class="odoc-spec">
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
File "test/generators/latex/Nested.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Nested.tex _build/default/test/generators/latex/Nested.tex.gen
diff --git a/_build/default/test/generators/latex/Nested.tex b/_build/default/test/generators/latex/Nested.tex.gen
index 7ff4ffb..67d8998 100644
--- a/_build/default/test/generators/latex/Nested.tex
+++ b/_build/default/test/generators/latex/Nested.tex.gen
@@ -1,30 +1,30 @@
\section{Module \ocamlinlinecode{Nested}}\label{Nested}%
This comment needs to be here before \#235 is fixed.


-\subsection{Module\label{module}}%
-\label{Nested-module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-X]{\ocamlinlinecode{X}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Type\label{type}}%
+\subsection{ Module\label{-module}}%
+\label{Nested-module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-X]{\ocamlinlinecode{X}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Type\label{-type}}%
\label{Nested-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
\medbreak
-\subsubsection{Values\label{values}}%
+\subsubsection{ Values\label{-values}}%
\label{Nested-X-val-x}\ocamlcodefragment{\ocamltag{keyword}{val} x : \hyperref[Nested-X-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}The value of x.\end{ocamlindent}%
\medbreak
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module X.\end{ocamlindent}%
\medbreak
-\subsection{Module type\label{module-type}}%
-\label{Nested-module-type-Y}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Nested-module-type-Y]{\ocamlinlinecode{Y}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Type\label{type_2}}%
+\subsection{ Module type\label{-module-type}}%
+\label{Nested-module-type-Y}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Nested-module-type-Y]{\ocamlinlinecode{Y}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Type\label{-type_2}}%
\label{Nested-module-type-Y-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
\medbreak
-\subsubsection{Values\label{values_2}}%
+\subsubsection{ Values\label{-values_2}}%
\label{Nested-module-type-Y-val-y}\ocamlcodefragment{\ocamltag{keyword}{val} y : \hyperref[Nested-module-type-Y-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}The value of y.\end{ocamlindent}%
\medbreak
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module type Y.\end{ocamlindent}%
\medbreak
-\subsection{Functor\label{functor}}%
+\subsection{ Functor\label{-functor}}%
\label{Nested-module-F}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F]{\ocamlinlinecode{F}}}\ocamlcodefragment{ (\hyperref[Nested-F-argument-1-Arg1]{\ocamlinlinecode{Arg1}} : \hyperref[Nested-module-type-Y]{\ocamlinlinecode{Y}}) (\hyperref[Nested-F-argument-2-Arg2]{\ocamlinlinecode{Arg2}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is a functor F.\end{ocamlindent}%
\medbreak
-\subsection{Class\label{class}}%
+\subsection{ Class\label{-class}}%
\label{Nested-class-z}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[Nested-class-z]{\ocamlinlinecode{z}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is class z.\end{ocamlindent}%
\medbreak
\label{Nested-class-inherits}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[Nested-class-inherits]{\ocamlinlinecode{inherits}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\
File "test/generators/html/Nested-class-z.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Nested-class-z.html _build/default/test/generators/html/Nested-class-z.html.gen
diff --git a/_build/default/test/generators/html/Nested-class-z.html b/_build/default/test/generators/html/Nested-class-z.html.gen
index 8133197..27614f6 100644
--- a/_build/default/test/generators/html/Nested-class-z.html
+++ b/_build/default/test/generators/html/Nested-class-z.html.gen
@@ -18,7 +18,7 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#methods">Methods</a></li></ul>
+    <ul><li><a href="#-methods"> Methods</a></li></ul>
</nav>
</div>
<div class="odoc-content">
@@ -38,7 +38,8 @@
</span>
</code>
</div>
-   </div><h2 id="methods"><a href="#methods" class="anchor"></a>Methods</h2>
+   </div>
+   <h2 id="-methods"><a href="#-methods" class="anchor"></a> Methods</h2>
<div class="odoc-spec">
<div class="spec method anchored" id="method-z">
<a href="#method-z" class="anchor"></a>
File "test/generators/latex/Nested.F.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Nested.F.tex _build/default/test/generators/latex/Nested.F.tex.gen
diff --git a/_build/default/test/generators/latex/Nested.F.tex b/_build/default/test/generators/latex/Nested.F.tex.gen
index f1058a1..b8d91ba 100644
--- a/_build/default/test/generators/latex/Nested.F.tex
+++ b/_build/default/test/generators/latex/Nested.F.tex.gen
@@ -4,21 +4,21 @@ This is a functor F.
Some additional comments.


\subsection{Parameters\label{parameters}}%
-\label{Nested-F-argument-1-Arg1}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F-argument-1-Arg1]{\ocamlinlinecode{Arg1}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Type\label{type}}%
+\label{Nested-F-argument-1-Arg1}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F-argument-1-Arg1]{\ocamlinlinecode{Arg1}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Type\label{-type}}%
\label{Nested-F-argument-1-Arg1-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
\medbreak
-\subsubsection{Values\label{values}}%
+\subsubsection{ Values\label{-values}}%
\label{Nested-F-argument-1-Arg1-val-y}\ocamlcodefragment{\ocamltag{keyword}{val} y : \hyperref[Nested-F-argument-1-Arg1-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}The value of y.\end{ocamlindent}%
\medbreak
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
-\label{Nested-F-argument-2-Arg2}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F-argument-2-Arg2]{\ocamlinlinecode{Arg2}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Type\label{type_2}}%
+\label{Nested-F-argument-2-Arg2}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F-argument-2-Arg2]{\ocamlinlinecode{Arg2}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Type\label{-type_2}}%
\label{Nested-F-argument-2-Arg2-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
\medbreak
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\subsection{Signature\label{signature}}%
-\subsection{Type\label{type_3}}%
+\subsection{ Type\label{-type_3}}%
\label{Nested-F-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Nested-F-argument-1-Arg1-type-t]{\ocamlinlinecode{Arg1.\allowbreak{}t}} * \hyperref[Nested-F-argument-2-Arg2-type-t]{\ocamlinlinecode{Arg2.\allowbreak{}t}}}\begin{ocamlindent}Some type.\end{ocamlindent}%
\medbreak


File "test/generators/latex/Nested.z.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Nested.z.tex _build/default/test/generators/latex/Nested.z.tex.gen
diff --git a/_build/default/test/generators/latex/Nested.z.tex b/_build/default/test/generators/latex/Nested.z.tex.gen
index 37cace5..7227ee8 100644
--- a/_build/default/test/generators/latex/Nested.z.tex
+++ b/_build/default/test/generators/latex/Nested.z.tex.gen
@@ -6,7 +6,7 @@ Some additional comments.
\label{Nested-class-z-val-y}\ocamlcodefragment{\ocamltag{keyword}{val} y : int}\begin{ocamlindent}Some value.\end{ocamlindent}%
\medbreak
\label{Nested-class-z-val-y'}\ocamlcodefragment{\ocamltag{keyword}{val} \ocamltag{keyword}{mutable} \ocamltag{keyword}{virtual} y' : int}\\
-\subsection{Methods\label{methods}}%
+\subsection{ Methods\label{-methods}}%
\label{Nested-class-z-method-z}\ocamlcodefragment{\ocamltag{keyword}{method} z : int}\begin{ocamlindent}Some method.\end{ocamlindent}%
\medbreak
\label{Nested-class-z-method-z'}\ocamlcodefragment{\ocamltag{keyword}{method} \ocamltag{keyword}{private} \ocamltag{keyword}{virtual} z' : int}\\
File "test/generators/man/Nested.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Nested.3o _build/default/test/generators/man/Nested.3o.gen
diff --git a/_build/default/test/generators/man/Nested.3o b/_build/default/test/generators/man/Nested.3o.gen
index 07530ad..7bfeb93 100644
--- a/_build/default/test/generators/man/Nested.3o
+++ b/_build/default/test/generators/man/Nested.3o.gen
@@ -16,7 +16,7 @@ This comment needs to be here before #235 is fixed\.
.nf
.sp
.in 3
-\fB1 Module\fR
+\fB1  Module\fR
.in
.sp
\f[CB]module\fR X : \f[CB]sig\fR \.\.\. \f[CB]end\fR
@@ -27,7 +27,7 @@ This is module X\.
.nf
.sp
.in 3
-\fB2 Module type\fR
+\fB2  Module type\fR
.in
.sp
\f[CB]module\fR \f[CB]type\fR Y = \f[CB]sig\fR
@@ -35,7 +35,7 @@ This is module X\.
.ti +2
.sp
.ti +2
-\fB2\.1\.1 Type\fR
+\fB2\.1\.1  Type\fR
.sp
.ti +2
\f[CB]type\fR t
@@ -46,7 +46,7 @@ Some type\.
.nf
.sp
.ti +2
-\fB2\.1\.2 Values\fR
+\fB2\.1\.2  Values\fR
.sp
.ti +2
\f[CB]val\fR y : t
@@ -65,7 +65,7 @@ This is module type Y\.
.nf
.sp
.in 3
-\fB3 Functor\fR
+\fB3  Functor\fR
.in
.sp
\f[CB]module\fR F (Arg1 : Y) (Arg2 : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR
@@ -76,7 +76,7 @@ This is a functor F\.
.nf
.sp
.in 3
-\fB4 Class\fR
+\fB4  Class\fR
.in
.sp
\f[CB]class\fR \f[CB]virtual\fR z : \f[CB]object\fR \.\.\. \f[CB]end\fR
File "test/generators/man/Nested.X.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Nested.X.3o _build/default/test/generators/man/Nested.X.3o.gen
diff --git a/_build/default/test/generators/man/Nested.X.3o b/_build/default/test/generators/man/Nested.X.3o.gen
index 9a7f25a..1187633 100644
--- a/_build/default/test/generators/man/Nested.X.3o
+++ b/_build/default/test/generators/man/Nested.X.3o.gen
@@ -20,7 +20,7 @@ Some additional comments\.
.nf
.sp
.in 3
-\fB1 Type\fR
+\fB1  Type\fR
.in
.sp
\f[CB]type\fR t
@@ -31,7 +31,7 @@ Some type\.
.nf
.sp
.in 3
-\fB2 Values\fR
+\fB2  Values\fR
.in
.sp
\f[CB]val\fR x : t
File "test/generators/man/Nested.F.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Nested.F.3o _build/default/test/generators/man/Nested.F.3o.gen
diff --git a/_build/default/test/generators/man/Nested.F.3o b/_build/default/test/generators/man/Nested.F.3o.gen
index 43a606a..91bf1a0 100644
--- a/_build/default/test/generators/man/Nested.F.3o
+++ b/_build/default/test/generators/man/Nested.F.3o.gen
@@ -28,7 +28,7 @@ Some additional comments\.
.ti +2
.sp
.ti +2
-\fB1\.1\.1 Type\fR
+\fB1\.1\.1  Type\fR
.sp
.ti +2
\f[CB]type\fR t
@@ -39,7 +39,7 @@ Some type\.
.nf
.sp
.ti +2
-\fB1\.1\.2 Values\fR
+\fB1\.1\.2  Values\fR
.sp
.ti +2
\f[CB]val\fR y : t
@@ -57,7 +57,7 @@ The value of y\.
.ti +2
.sp
.ti +2
-\fB1\.1\.3 Type\fR
+\fB1\.1\.3  Type\fR
.sp
.ti +2
\f[CB]type\fR t
@@ -75,7 +75,7 @@ Some type\.
.in
.sp
.in 3
-\fB3 Type\fR
+\fB3  Type\fR
.in
.sp
\f[CB]type\fR t = Arg1\.t * Arg2\.t
File "test/generators/man/Nested.class-z.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Nested.class-z.3o _build/default/test/generators/man/Nested.class-z.3o.gen
diff --git a/_build/default/test/generators/man/Nested.class-z.3o b/_build/default/test/generators/man/Nested.class-z.3o.gen
index 83a7863..9d83983 100644
--- a/_build/default/test/generators/man/Nested.class-z.3o
+++ b/_build/default/test/generators/man/Nested.class-z.3o.gen
@@ -28,7 +28,7 @@ Some value\.
\f[CB]val\fR \f[CB]mutable\fR \f[CB]virtual\fR y' : int
.sp
.in 3
-\fB1 Methods\fR
+\fB1  Methods\fR
.in
.sp
\f[CB]method\fR z : int
File "test/generators/html/mld.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/mld.html _build/default/test/generators/html/mld.html.gen
diff --git a/_build/default/test/generators/html/mld.html b/_build/default/test/generators/html/mld.html.gen
index 35c3614..e058c43 100644
--- a/_build/default/test/generators/html/mld.html
+++ b/_build/default/test/generators/html/mld.html.gen
@@ -12,36 +12,36 @@
<a href="index.html">🏠</a> &#x00BB; mld
</nav>
<header class="odoc-preamble">
-   <h1 id="mld-page"><a href="#mld-page" class="anchor"></a>Mld Page</h1>
+   <h1 id="-mld-page"><a href="#-mld-page" class="anchor"></a> Mld Page</h1>
<p>This is an <code>.mld</code> file. It doesn't have an auto-generated
title, like modules and other pages generated fully by odoc do.
</p><p>It will have a TOC generated from section headings.</p>
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#section">Section</a></li>
-     <li><a href="#another-section">Another section</a>
-      <ul><li><a href="#subsection">Subsection</a></li>
-       <li><a href="#another-subsection">Another Subsection</a></li>
+    <ul><li><a href="#-section"> Section</a></li>
+     <li><a href="#-another-section"> Another section</a>
+      <ul><li><a href="#-subsection"> Subsection</a></li>
+       <li><a href="#-another-subsection"> Another Subsection</a></li>
</ul>
</li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="section"><a href="#section" class="anchor"></a>Section</h2>
+   <h2 id="-section"><a href="#-section" class="anchor"></a> Section</h2>
<p>This is a section.</p><p>Another paragraph in section.</p>
-   <h2 id="another-section"><a href="#another-section" class="anchor"></a>
-    Another section
+   <h2 id="-another-section"><a href="#-another-section" class="anchor"></a>
+     Another section
</h2><p>This is another section.</p><p>Another paragraph in section 2.</p>
-   <h3 id="subsection"><a href="#subsection" class="anchor"></a>Subsection
+   <h3 id="-subsection"><a href="#-subsection" class="anchor"></a> Subsection
</h3><p>This is a subsection.</p><p>Another paragraph in subsection.</p>
<p>Yet another paragraph in subsection.</p>
-   <h3 id="another-subsection">
-    <a href="#another-subsection" class="anchor"></a>Another Subsection
+   <h3 id="-another-subsection">
+    <a href="#-another-subsection" class="anchor"></a> Another Subsection
</h3><p>This is another subsection.</p>
<p>Another paragraph in subsection 2.</p>
-   <p>Yet another paragraph in subsection 2.</p>
+   <p>Yet another paragraph in subsection 2. </p>
</div>
</body>
</html>
File "test/generators/latex/mld.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/mld.tex _build/default/test/generators/latex/mld.tex.gen
diff --git a/_build/default/test/generators/latex/mld.tex b/_build/default/test/generators/latex/mld.tex.gen
index 292f8bf..beaa1b4 100644
--- a/_build/default/test/generators/latex/mld.tex
+++ b/_build/default/test/generators/latex/mld.tex.gen
@@ -1,31 +1,31 @@
-\section{Mld Page\label{mld-page}}\label{mld}%
+\section{ Mld Page\label{-mld-page}}\label{mld}%
This is an \ocamlinlinecode{.\allowbreak{}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.


-\subsection{Section\label{section}}%
+\subsection{ Section\label{-section}}%
This is a section.


Another paragraph in section.


-\subsection{Another section\label{another-section}}%
+\subsection{ Another section\label{-another-section}}%
This is another section.


Another paragraph in section 2.


-\subsubsection{Subsection\label{subsection}}%
+\subsubsection{ Subsection\label{-subsection}}%
This is a subsection.


Another paragraph in subsection.


Yet another paragraph in subsection.


-\subsubsection{Another Subsection\label{another-subsection}}%
+\subsubsection{ Another Subsection\label{-another-subsection}}%
This is another subsection.


Another paragraph in subsection 2.


-Yet another paragraph in subsection 2.
+Yet another paragraph in subsection 2. 


File "test/generators/latex/Module.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Module.tex _build/default/test/generators/latex/Module.tex.gen
diff --git a/_build/default/test/generators/latex/Module.tex b/_build/default/test/generators/latex/Module.tex.gen
index f1a387a..89333ae 100644
--- a/_build/default/test/generators/latex/Module.tex
+++ b/_build/default/test/generators/latex/Module.tex.gen
@@ -1,7 +1,7 @@
\section{Module \ocamlinlinecode{Module}}\label{Module}%
Foo.


-\label{Module-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\begin{ocamlindent}The module needs at least one signature item, otherwise a bug causes the compiler to drop the module comment (above). See \href{https://caml.inria.fr/mantis/view.php?id=7701}{https://caml.inria.fr/mantis/view.php?id=7701}\footnote{\url{https://caml.inria.fr/mantis/view.php?id=7701}}.\end{ocamlindent}%
+\label{Module-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\begin{ocamlindent}The module needs at least one signature item, otherwise a bug causes the  compiler to drop the module comment (above). See  \href{https://caml.inria.fr/mantis/view.php?id=7701}{https://caml.inria.fr/mantis/view.php?id=7701}\footnote{\url{https://caml.inria.fr/mantis/view.php?id=7701}}.\end{ocamlindent}%
\medbreak
\label{Module-module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Module-module-type-S]{\ocamlinlinecode{S}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Module-module-type-S-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
\label{Module-module-type-S-type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u}\\
File "test/generators/man/mld.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/mld.3o _build/default/test/generators/man/mld.3o.gen
diff --git a/_build/default/test/generators/man/mld.3o b/_build/default/test/generators/man/mld.3o.gen
index 003c22a..1130830 100644
--- a/_build/default/test/generators/man/mld.3o
+++ b/_build/default/test/generators/man/mld.3o.gen
@@ -5,7 +5,7 @@ mld
.SH Synopsis
.sp
.in 2
-\fBMld Page\fR
+\fB Mld Page\fR
.in
.sp
.fi
@@ -18,7 +18,7 @@ It will have a TOC generated from section headings\.
.nf
.sp
.in 3
-\fB1 Section\fR
+\fB1  Section\fR
.in
.sp
.fi
@@ -28,7 +28,7 @@ Another paragraph in section\.
.nf
.sp
.in 3
-\fB2 Another section\fR
+\fB2  Another section\fR
.in
.sp
.fi
@@ -38,7 +38,7 @@ Another paragraph in section 2\.
.nf
.sp
.in 4
-\fB2\.1 Subsection\fR
+\fB2\.1  Subsection\fR
.in
.sp
.fi
@@ -50,7 +50,7 @@ Yet another paragraph in subsection\.
.nf
.sp
.in 4
-\fB2\.2 Another Subsection\fR
+\fB2\.2  Another Subsection\fR
.in
.sp
.fi
@@ -58,6 +58,6 @@ This is another subsection\.
.sp
Another paragraph in subsection 2\.
.sp
-Yet another paragraph in subsection 2\.
+Yet another paragraph in subsection 2\. 
.nf


File "test/generators/man/Module.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Module.3o _build/default/test/generators/man/Module.3o.gen
diff --git a/_build/default/test/generators/man/Module.3o b/_build/default/test/generators/man/Module.3o.gen
index 4bab405..269b891 100644
--- a/_build/default/test/generators/man/Module.3o
+++ b/_build/default/test/generators/man/Module.3o.gen
@@ -18,7 +18,7 @@ Foo\.
.fi
.br
.ti +2
-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  
.UR https://caml.inria.fr/mantis/view.php?id=7701
https://caml\.inria\.fr/mantis/view\.php?id=7701
.UE
File "test/generators/html/Module.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Module.html _build/default/test/generators/html/Module.html.gen
diff --git a/_build/default/test/generators/html/Module.html b/_build/default/test/generators/html/Module.html.gen
index 67785c4..db6c2c2 100644
--- a/_build/default/test/generators/html/Module.html
+++ b/_build/default/test/generators/html/Module.html.gen
@@ -22,7 +22,7 @@
</div>
<div class="spec-doc">
<p>The module needs at least one signature item, otherwise a bug
-       causes the compiler to drop the module comment (above). See 
+       causes the  compiler to drop the module comment (above). See  
<a href="https://caml.inria.fr/mantis/view.php?id=7701">
https://caml.inria.fr/mantis/view.php?id=7701
</a>.
File "test/generators/html/Labels.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Labels.html _build/default/test/generators/html/Labels.html.gen
diff --git a/_build/default/test/generators/html/Labels.html b/_build/default/test/generators/html/Labels.html.gen
index be76957..2fd0f3b 100644
--- a/_build/default/test/generators/html/Labels.html
+++ b/_build/default/test/generators/html/Labels.html.gen
@@ -16,14 +16,14 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#L1">Attached to unit</a></li>
-     <li><a href="#L2">Attached to nothing</a></li>
+    <ul><li><a href="#L1"> Attached to unit</a></li>
+     <li><a href="#L2"> Attached to nothing</a></li>
</ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="L1"><a href="#L1" class="anchor"></a>Attached to unit</h2>
-   <h2 id="L2"><a href="#L2" class="anchor"></a>Attached to nothing</h2>
+   <h2 id="L1"><a href="#L1" class="anchor"></a> Attached to unit</h2>
+   <h2 id="L2"><a href="#L2" class="anchor"></a> Attached to nothing</h2>
<div class="odoc-spec">
<div class="spec module anchored" id="module-A">
<a href="#module-A" class="anchor"></a>
@@ -40,7 +40,7 @@
<div class="spec type anchored" id="type-t">
<a href="#type-t" class="anchor"></a>
<code><span><span class="keyword">type</span> t</span></code>
-    </div><div class="spec-doc"><p>Attached to type</p></div>
+    </div><div class="spec-doc"><p> Attached to type</p></div>
</div>
<div class="odoc-spec">
<div class="spec value anchored" id="val-f">
@@ -49,7 +49,7 @@
<span><span class="keyword">val</span> f : <a href="#type-t">t</a>
</span>
</code>
-    </div><div class="spec-doc"><p>Attached to value</p></div>
+    </div><div class="spec-doc"><p> Attached to value</p></div>
</div>
<div class="odoc-spec">
<div class="spec value external anchored" id="val-e">
@@ -60,7 +60,7 @@
<a href="#type-t">t</a>
</span>
</code>
-    </div><div class="spec-doc"><p>Attached to external</p></div>
+    </div><div class="spec-doc"><p> Attached to external</p></div>
</div>
<div class="odoc-spec">
<div class="spec module-type anchored" id="module-type-S">
@@ -106,7 +106,7 @@
<code><span><span class="keyword">exception</span> </span>
<span><span class="exception">E</span></span>
</code>
-    </div><div class="spec-doc"><p>Attached to exception</p></div>
+    </div><div class="spec-doc"><p> Attached to exception</p></div>
</div>
<div class="odoc-spec">
<div class="spec type anchored" id="type-x">
@@ -130,7 +130,7 @@
</code>
</li>
</ol>
-    </div><div class="spec-doc"><p>Attached to extension</p></div>
+    </div><div class="spec-doc"><p> Attached to extension</p></div>
</div>
<div class="odoc-spec">
<div class="spec module-substitution anchored" id="module-S">
@@ -140,7 +140,7 @@
<a href="Labels-A.html">A</a>
</span>
</code>
-    </div><div class="spec-doc"><p>Attached to module subst</p></div>
+    </div><div class="spec-doc"><p> Attached to module subst</p></div>
</div>
<div class="odoc-spec">
<div class="spec type subst anchored" id="type-s">
@@ -148,7 +148,7 @@
<code><span><span class="keyword">type</span> s</span>
<span> := <a href="#type-t">t</a></span>
</code>
-    </div><div class="spec-doc"><p>Attached to type subst</p></div>
+    </div><div class="spec-doc"><p> Attached to type subst</p></div>
</div>
<div class="odoc-spec">
<div class="spec type anchored" id="type-u">
@@ -161,7 +161,7 @@
<code><span>| </span><span><span class="constructor">A'</span></span>
</code>
<div class="def-doc"><span class="comment-delim">(*</span>
-        <p>Attached to constructor</p><span class="comment-delim">*)</span>
+        <p> Attached to constructor</p><span class="comment-delim">*)</span>
</div>
</li>
</ol>
@@ -178,27 +178,28 @@
<a href="#type-v.f" class="anchor"></a>
<code><span>f : <a href="#type-t">t</a>;</span></code>
<div class="def-doc"><span class="comment-delim">(*</span>
-        <p>Attached to field</p><span class="comment-delim">*)</span>
+        <p> Attached to field</p><span class="comment-delim">*)</span>
</div>
</li>
</ol><code><span>}</span></code>
</div>
-   </div><p>Testing that labels can be referenced</p>
-   <ul><li><a href="#L1" title="L1">Attached to unit</a></li>
-    <li><a href="#L2" title="L2">Attached to nothing</a></li>
-    <li><a href="#L3" title="L3">Attached to module</a></li>
-    <li><a href="#L4" title="L4">Attached to type</a></li>
-    <li><a href="#L5" title="L5">Attached to value</a></li>
-    <li><a href="#L6" title="L6">Attached to module type</a></li>
-    <li><a href="#L7" title="L7">Attached to class</a></li>
-    <li><a href="#L8" title="L8">Attached to class type</a></li>
-    <li><a href="#L9" title="L9">Attached to exception</a></li>
-    <li><a href="#L10" title="L10">Attached to extension</a></li>
-    <li><a href="#L11" title="L11">Attached to module subst</a></li>
-    <li><a href="#L12" title="L12">Attached to type subst</a></li>
-    <li><a href="#L13" title="L13">Attached to constructor</a></li>
-    <li><a href="#L14" title="L14">Attached to field</a></li>
-   </ul>
+   </div>
+   <p>Testing that labels can be referenced  - 
+    <a href="#L1" title="L1"> Attached to unit</a>  - 
+    <a href="#L2" title="L2"> Attached to nothing</a>  - 
+    <a href="#L3" title="L3"> Attached to module</a>  - 
+    <a href="#L4" title="L4"> Attached to type</a>  - 
+    <a href="#L5" title="L5"> Attached to value</a>  - 
+    <a href="#L6" title="L6"> Attached to module type</a>  - 
+    <a href="#L7" title="L7"> Attached to class</a>  - 
+    <a href="#L8" title="L8"> Attached to class type</a>  - 
+    <a href="#L9" title="L9"> Attached to exception</a>  - 
+    <a href="#L10" title="L10"> Attached to extension</a>  - 
+    <a href="#L11" title="L11"> Attached to module subst</a>  - 
+    <a href="#L12" title="L12"> Attached to type subst</a>  - 
+    <a href="#L13" title="L13"> Attached to constructor</a>  - 
+    <a href="#L14" title="L14"> Attached to field</a> 
+   </p>
</div>
</body>
</html>
File "test/generators/html/Labels-A.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Labels-A.html _build/default/test/generators/html/Labels-A.html.gen
diff --git a/_build/default/test/generators/html/Labels-A.html b/_build/default/test/generators/html/Labels-A.html.gen
index 7ab7ac0..80d2db2 100644
--- a/_build/default/test/generators/html/Labels-A.html
+++ b/_build/default/test/generators/html/Labels-A.html.gen
@@ -17,11 +17,11 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#L3">Attached to module</a></li></ul>
+    <ul><li><a href="#L3"> Attached to module</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="L3"><a href="#L3" class="anchor"></a>Attached to module</h2>
+   <h2 id="L3"><a href="#L3" class="anchor"></a> Attached to module</h2>
</div>
</body>
</html>
File "test/generators/html/Labels-module-type-S.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Labels-module-type-S.html _build/default/test/generators/html/Labels-module-type-S.html.gen
diff --git a/_build/default/test/generators/html/Labels-module-type-S.html b/_build/default/test/generators/html/Labels-module-type-S.html.gen
index dd0250a..43ae1de 100644
--- a/_build/default/test/generators/html/Labels-module-type-S.html
+++ b/_build/default/test/generators/html/Labels-module-type-S.html.gen
@@ -17,11 +17,11 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#L6">Attached to module type</a></li></ul>
+    <ul><li><a href="#L6"> Attached to module type</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="L6"><a href="#L6" class="anchor"></a>Attached to module type</h2>
+   <h2 id="L6"><a href="#L6" class="anchor"></a> Attached to module type</h2>
</div>
</body>
</html>
File "test/generators/html/Labels-class-c.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Labels-class-c.html _build/default/test/generators/html/Labels-class-c.html.gen
diff --git a/_build/default/test/generators/html/Labels-class-c.html b/_build/default/test/generators/html/Labels-class-c.html.gen
index 96b4d7f..09a13b6 100644
--- a/_build/default/test/generators/html/Labels-class-c.html
+++ b/_build/default/test/generators/html/Labels-class-c.html.gen
@@ -17,11 +17,11 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#L7">Attached to class</a></li></ul>
+    <ul><li><a href="#L7"> Attached to class</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="L7"><a href="#L7" class="anchor"></a>Attached to class</h2>
+   <h2 id="L7"><a href="#L7" class="anchor"></a> Attached to class</h2>
</div>
</body>
</html>
File "test/generators/html/Labels-class-type-cs.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Labels-class-type-cs.html _build/default/test/generators/html/Labels-class-type-cs.html.gen
diff --git a/_build/default/test/generators/html/Labels-class-type-cs.html b/_build/default/test/generators/html/Labels-class-type-cs.html.gen
index 54810c8..45dc485 100644
--- a/_build/default/test/generators/html/Labels-class-type-cs.html
+++ b/_build/default/test/generators/html/Labels-class-type-cs.html.gen
@@ -17,11 +17,11 @@
</header>
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
-    <ul><li><a href="#L8">Attached to class type</a></li></ul>
+    <ul><li><a href="#L8"> Attached to class type</a></li></ul>
</nav>
</div>
<div class="odoc-content">
-   <h2 id="L8"><a href="#L8" class="anchor"></a>Attached to class type</h2>
+   <h2 id="L8"><a href="#L8" class="anchor"></a> Attached to class type</h2>
</div>
</body>
</html>
File "test/generators/latex/Labels.c.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Labels.c.tex _build/default/test/generators/latex/Labels.c.tex.gen
diff --git a/_build/default/test/generators/latex/Labels.c.tex b/_build/default/test/generators/latex/Labels.c.tex.gen
index 9625710..2be3cef 100644
--- a/_build/default/test/generators/latex/Labels.c.tex
+++ b/_build/default/test/generators/latex/Labels.c.tex.gen
@@ -1,4 +1,4 @@
\section{Class \ocamlinlinecode{Labels.\allowbreak{}c}}\label{Labels-class-c}%
-\subsection{Attached to class\label{L7}}%
+\subsection{ Attached to class\label{L7}}%


File "test/generators/latex/Labels.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Labels.tex _build/default/test/generators/latex/Labels.tex.gen
diff --git a/_build/default/test/generators/latex/Labels.tex b/_build/default/test/generators/latex/Labels.tex.gen
index 033caeb..6300a5c 100644
--- a/_build/default/test/generators/latex/Labels.tex
+++ b/_build/default/test/generators/latex/Labels.tex.gen
@@ -1,59 +1,45 @@
\section{Module \ocamlinlinecode{Labels}}\label{Labels}%
-\subsection{Attached to unit\label{L1}}%
-\subsection{Attached to nothing\label{L2}}%
-\label{Labels-module-A}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Labels-A]{\ocamlinlinecode{A}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module\label{L3}}%
+\subsection{ Attached to unit\label{L1}}%
+\subsection{ Attached to nothing\label{L2}}%
+\label{Labels-module-A}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Labels-A]{\ocamlinlinecode{A}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Attached to module\label{L3}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
-\label{Labels-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Attached to type\end{ocamlindent}%
+\label{Labels-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent} Attached to type\end{ocamlindent}%
\medbreak
-\label{Labels-val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to value\end{ocamlindent}%
+\label{Labels-val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent} Attached to value\end{ocamlindent}%[0m
\medbreak
-\label{Labels-val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : unit \ocamltag{arrow}{$\rightarrow$} \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to external\end{ocamlindent}%
+\label{Labels-val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : unit \ocamltag{arrow}{$\rightarrow$} \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent} Attached to external\end{ocamlindent}%
\medbreak
-\label{Labels-module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Labels-module-type-S]{\ocamlinlinecode{S}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module type\label{L6}}%
+\label{Labels-module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Labels-module-type-S]{\ocamlinlinecode{S}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{ Attached to module type\label{L6}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{Labels-class-c}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Labels-class-c]{\ocamlinlinecode{c}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\
-\label{Labels-class-type-cs}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type}  \hyperref[Labels-class-type-cs]{\ocamlinlinecode{cs}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\subsubsection{Attached to class type\label{L8}}%
+\label{Labels-class-type-cs}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type}  \hyperref[Labels-class-type-cs]{\ocamlinlinecode{cs}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\subsubsection{ Attached to class type\label{L8}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
-\label{Labels-exception-E}\ocamlcodefragment{\ocamltag{keyword}{exception} \ocamltag{exception}{E}}\begin{ocamlindent}Attached to exception\end{ocamlindent}%
+\label{Labels-exception-E}\ocamlcodefragment{\ocamltag{keyword}{exception} \ocamltag{exception}{E}}\begin{ocamlindent} Attached to exception\end{ocamlindent}%
\medbreak
\label{Labels-type-x}\ocamlcodefragment{\ocamltag{keyword}{type} x = .\allowbreak{}.\allowbreak{}}\\
\label{Labels-extension-decl-X}\ocamlcodefragment{\ocamltag{keyword}{type} \hyperref[Labels-type-x]{\ocamlinlinecode{x}} += }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{extension}{X}}\label{Labels-extension-X}\\
\end{ocamltabular}%
\\
-\begin{ocamlindent}Attached to extension\end{ocamlindent}%
+\begin{ocamlindent} Attached to extension\end{ocamlindent}%
\medbreak
-\label{Labels-module-S}\ocamlcodefragment{\ocamltag{keyword}{module} S := \hyperref[Labels-A]{\ocamlinlinecode{A}}}\begin{ocamlindent}Attached to module subst\end{ocamlindent}%
+\label{Labels-module-S}\ocamlcodefragment{\ocamltag{keyword}{module} S := \hyperref[Labels-A]{\ocamlinlinecode{A}}}\begin{ocamlindent} Attached to module subst\end{ocamlindent}%
\medbreak
-\label{Labels-type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s := \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to type subst\end{ocamlindent}%
+\label{Labels-type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s := \hyperref[Labels-type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent} Attached to type subst\end{ocamlindent}%
\medbreak
\label{Labels-type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = }\\
-\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{A'}}\label{Labels-type-u.A'}& Attached to constructor\\
+\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{A'}}\label{Labels-type-u.A'}&  Attached to constructor\\
\end{ocamltabular}%
\\
\label{Labels-type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \{}\\
-\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{f : \hyperref[Labels-type-t]{\ocamlinlinecode{t}};\allowbreak{}}\label{Labels-type-v.f}& Attached to field\\
+\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{f : \hyperref[Labels-type-t]{\ocamlinlinecode{t}};\allowbreak{}}\label{Labels-type-v.f}&  Attached to field\\
\end{ocamltabular}%
\\
\ocamlcodefragment{\}}\\
-Testing that labels can be referenced
+Testing that labels can be referenced  - \hyperref[Labels-L1]{\ocamlinlinecode{ Attached to unit}[p\pageref*{Labels-L1}]}  - \hyperref[Labels-L2]{\ocamlinlinecode{ Attached to nothing}[p\pageref*{Labels-L2}]}  - \hyperref[Labels-L3]{\ocamlinlinecode{ Attached to module}[p\pageref*{Labels-L3}]}  - \hyperref[Labels-L4]{\ocamlinlinecode{ Attached to type}[p\pageref*{Labels-L4}]}  - \hyperref[Labels-L5]{\ocamlinlinecode{ Attached to value}[p\pageref*{Labels-L5}]}  - \hyperref[Labels-L6]{\ocamlinlinecode{ Attached to module type}[p\pageref*{Labels-L6}]}  - \hyperref[Labels-L7]{\ocamlinlinecode{ Attached to class}[p\pageref*{Labels-L7}]}  - \hyperref[Labels-L8]{\ocamlinlinecode{ Attached to class type}[p\pageref*{Labels-L8}]}  - \hyperref[Labels-L9]{\ocamlinlinecode{ Attached to exception}[p\pageref*{Labels-L9}]}  - \hyperref[Labels-L10]{\ocamlinlinecode{ Attached to extension}[p\pageref*{Labels-L10}]}  - \hyperref[Labels-L11]{\ocamlinlinecode{ Attached to module subst}[p\pageref*{Labels-L11}]}  - \hyperref[Labels-L12]{\ocamlinlinecode{ Attached to type subst}[p\pageref*{Labels-L12}]}  - \hyperref[Labels-L13]{\ocamlinlinecode{ Attached to constructor}[p\pageref*{Labels-L13}]}  - \hyperref[Labels-L14]{\ocamlinlinecode{ Attached to field}[p\pageref*{Labels-L14}]} 


-\begin{itemize}\item{\hyperref[Labels-L1]{\ocamlinlinecode{Attached to unit}[p\pageref*{Labels-L1}]}}%
-\item{\hyperref[Labels-L2]{\ocamlinlinecode{Attached to nothing}[p\pageref*{Labels-L2}]}}%
-\item{\hyperref[Labels-L3]{\ocamlinlinecode{Attached to module}[p\pageref*{Labels-L3}]}}%
-\item{\hyperref[Labels-L4]{\ocamlinlinecode{Attached to type}[p\pageref*{Labels-L4}]}}%
-\item{\hyperref[Labels-L5]{\ocamlinlinecode{Attached to value}[p\pageref*{Labels-L5}]}}%
-\item{\hyperref[Labels-L6]{\ocamlinlinecode{Attached to module type}[p\pageref*{Labels-L6}]}}%
-\item{\hyperref[Labels-L7]{\ocamlinlinecode{Attached to class}[p\pageref*{Labels-L7}]}}%
-\item{\hyperref[Labels-L8]{\ocamlinlinecode{Attached to class type}[p\pageref*{Labels-L8}]}}%
-\item{\hyperref[Labels-L9]{\ocamlinlinecode{Attached to exception}[p\pageref*{Labels-L9}]}}%
-\item{\hyperref[Labels-L10]{\ocamlinlinecode{Attached to extension}[p\pageref*{Labels-L10}]}}%
-\item{\hyperref[Labels-L11]{\ocamlinlinecode{Attached to module subst}[p\pageref*{Labels-L11}]}}%
-\item{\hyperref[Labels-L12]{\ocamlinlinecode{Attached to type subst}[p\pageref*{Labels-L12}]}}%
-\item{\hyperref[Labels-L13]{\ocamlinlinecode{Attached to constructor}[p\pageref*{Labels-L13}]}}%
-\item{\hyperref[Labels-L14]{\ocamlinlinecode{Attached to field}[p\pageref*{Labels-L14}]}}\end{itemize}%


\input{Labels.c.tex}
File "test/generators/man/Labels.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Labels.3o _build/default/test/generators/man/Labels.3o.gen
diff --git a/_build/default/test/generators/man/Labels.3o b/_build/default/test/generators/man/Labels.3o.gen
index 969feb2..fe4110c 100644
--- a/_build/default/test/generators/man/Labels.3o
+++ b/_build/default/test/generators/man/Labels.3o.gen
@@ -13,11 +13,11 @@ Labels
.nf
.sp
.in 3
-\fB1 Attached to unit\fR
+\fB1  Attached to unit\fR
.in
.sp
.in 3
-\fB2 Attached to nothing\fR
+\fB2  Attached to nothing\fR
.in
.sp
\f[CB]module\fR A : \f[CB]sig\fR \.\.\. \f[CB]end\fR
@@ -26,21 +26,21 @@ Labels
.fi
.br
.ti +2
-Attached to type
+ Attached to type
.nf
.sp
\f[CB]val\fR f : t
.fi
.br
.ti +2
-Attached to value
+ Attached to value
.nf
.sp
\f[CB]val\fR e : unit \f[CB]\->\fR t
.fi
.br
.ti +2
-Attached to external
+ Attached to external
.nf
.sp
\f[CB]module\fR \f[CB]type\fR S = \f[CB]sig\fR
@@ -48,7 +48,7 @@ Attached to external
.ti +2
.sp
.ti +2
-\fB2\.1\.1 Attached to module type\fR
+\fB2\.1\.1  Attached to module type\fR
.sp
.ti +2


@@ -62,7 +62,7 @@ Attached to external
.ti +2
.sp
.ti +2
-\fB2\.1\.2 Attached to class type\fR
+\fB2\.1\.2  Attached to class type\fR
.sp
.ti +2


@@ -73,7 +73,7 @@ Attached to external
.fi
.br
.ti +2
-Attached to exception
+ Attached to exception
.nf
.sp
\f[CB]type\fR x = \.\.
@@ -86,21 +86,21 @@ Attached to exception
.fi
.br
.ti +2
-Attached to extension
+ Attached to extension
.nf
.sp
\f[CB]module\fR S := A
.fi
.br
.ti +2
-Attached to module subst
+ Attached to module subst
.nf
.sp
\f[CB]type\fR s := t
.fi
.br
.ti +2
-Attached to type subst
+ Attached to type subst
.nf
.sp
\f[CB]type\fR u =
@@ -109,7 +109,7 @@ Attached to type subst
| \f[CB]A'\fR
.br
.ti +4
-(* Attached to constructor *)
+(*  Attached to constructor *)
.br
.sp
\f[CB]type\fR v = {
@@ -118,39 +118,11 @@ Attached to type subst
f : t;
.br
.ti +4
-(* Attached to field *)
+(*  Attached to field *)
.br
}
.sp
.fi
-Testing that labels can be referenced
-.sp 
-\(bu \f[CI]Attached to unit\fR
-.br 
-\(bu \f[CI]Attached to nothing\fR
-.br 
-\(bu \f[CI]Attached to module\fR
-.br 
-\(bu \f[CI]Attached to type\fR
-.br 
-\(bu \f[CI]Attached to value\fR
-.br 
-\(bu \f[CI]Attached to module type\fR
-.br 
-\(bu \f[CI]Attached to class\fR
-.br 
-\(bu \f[CI]Attached to class type\fR
-.br 
-\(bu \f[CI]Attached to exception\fR
-.br 
-\(bu \f[CI]Attached to extension\fR
-.br 
-\(bu \f[CI]Attached to module subst\fR
-.br 
-\(bu \f[CI]Attached to type subst\fR
-.br 
-\(bu \f[CI]Attached to constructor\fR
-.br 
-\(bu \f[CI]Attached to field\fR
+Testing that labels can be referenced  - \f[CI] Attached to unit\fR  - \f[CI] Attached to nothing\fR  - \f[CI] Attached to module\fR  - \f[CI] Attached to type\fR  - \f[CI] Attached to value\fR  - \f[CI] Attached to module type\fR  - \f[CI] Attached to class\fR  - \f[CI] Attached to class type\fR  - \f[CI] Attached to exception\fR  - \f[CI] Attached to extension\fR  - \f[CI] Attached to module subst\fR  - \f[CI] Attached to type subst\fR  - \f[CI] Attached to constructor\fR  - \f[CI] Attached to field\fR 
.nf


File "test/generators/man/Labels.A.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Labels.A.3o _build/default/test/generators/man/Labels.A.3o.gen
diff --git a/_build/default/test/generators/man/Labels.A.3o b/_build/default/test/generators/man/Labels.A.3o.gen
index 732c835..ef325a0 100644
--- a/_build/default/test/generators/man/Labels.A.3o
+++ b/_build/default/test/generators/man/Labels.A.3o.gen
@@ -13,7 +13,7 @@ Labels\.A
.nf
.sp
.in 3
-\fB1 Attached to module\fR
+\fB1  Attached to module\fR
.in
.sp


File "test/generators/man/Labels.class-c.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Labels.class-c.3o _build/default/test/generators/man/Labels.class-c.3o.gen
diff --git a/_build/default/test/generators/man/Labels.class-c.3o b/_build/default/test/generators/man/Labels.class-c.3o.gen
index ce5297a..5cc4693 100644
--- a/_build/default/test/generators/man/Labels.class-c.3o
+++ b/_build/default/test/generators/man/Labels.class-c.3o.gen
@@ -13,7 +13,7 @@ Labels\.c
.nf
.sp
.in 3
-\fB1 Attached to class\fR
+\fB1  Attached to class\fR
.in
.sp


File "test/generators/html/Include2.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Include2.html _build/default/test/generators/html/Include2.html.gen
diff --git a/_build/default/test/generators/html/Include2.html b/_build/default/test/generators/html/Include2.html.gen
index 36cf9c8..311f0c5 100644
--- a/_build/default/test/generators/html/Include2.html
+++ b/_build/default/test/generators/html/Include2.html.gen
@@ -80,7 +80,7 @@
</div>
<div class="spec-doc">
<p>The <code>include Y</code> below should have the synopsis from
-       <code>Y</code>'s top-comment attached to it.
+       <code>Y</code>'s top-comment  attached to it.
</p>
</div>
</div>
File "test/generators/html/Include2-Y_include_synopsis.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Include2-Y_include_synopsis.html _build/default/test/generators/html/Include2-Y_include_synopsis.html.gen
diff --git a/_build/default/test/generators/html/Include2-Y_include_synopsis.html b/_build/default/test/generators/html/Include2-Y_include_synopsis.html.gen
index 8e6e83a..ed4a75c 100644
--- a/_build/default/test/generators/html/Include2-Y_include_synopsis.html
+++ b/_build/default/test/generators/html/Include2-Y_include_synopsis.html.gen
@@ -15,7 +15,7 @@
<header class="odoc-preamble">
<h1>Module <code><span>Include2.Y_include_synopsis</span></code></h1>
<p>The <code>include Y</code> below should have the synopsis from
-    <code>Y</code>'s top-comment attached to it.
+    <code>Y</code>'s top-comment  attached to it.
</p>
</header>
<div class="odoc-content">
File "test/generators/latex/Include2.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Include2.tex _build/default/test/generators/latex/Include2.tex.gen
diff --git a/_build/default/test/generators/latex/Include2.tex b/_build/default/test/generators/latex/Include2.tex.gen
index bd039c8..fc5cf96 100644
--- a/_build/default/test/generators/latex/Include2.tex
+++ b/_build/default/test/generators/latex/Include2.tex.gen
@@ -10,7 +10,7 @@
\medbreak
\label{Include2-module-Y_include_synopsis}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_synopsis]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}synopsis}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_synopsis-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y-type-t]{\ocamlinlinecode{Y.\allowbreak{}t}}}\\
\end{ocamlindent}%
-\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}The \ocamlinlinecode{include Y} below should have the synopsis from \ocamlinlinecode{Y}'s top-comment attached to it.\end{ocamlindent}%
+\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}The \ocamlinlinecode{include Y} below should have the synopsis from \ocamlinlinecode{Y}'s top-comment  attached to it.\end{ocamlindent}%
\medbreak
\label{Include2-module-Y_include_doc}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_doc]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}doc}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}Doc attached to \ocamlinlinecode{include Y}. \ocamlinlinecode{Y}'s top-comment shouldn't appear here.\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_doc-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y-type-t]{\ocamlinlinecode{Y.\allowbreak{}t}}}\\
\end{ocamlindent}%
File "test/generators/man/Include2.Y_include_synopsis.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Include2.Y_include_synopsis.3o _build/default/test/generators/man/Include2.Y_include_synopsis.3o.gen
diff --git a/_build/default/test/generators/man/Include2.Y_include_synopsis.3o b/_build/default/test/generators/man/Include2.Y_include_synopsis.3o.gen
index 637f41f..4d7d481 100644
--- a/_build/default/test/generators/man/Include2.Y_include_synopsis.3o
+++ b/_build/default/test/generators/man/Include2.Y_include_synopsis.3o.gen
@@ -9,7 +9,7 @@ Include2\.Y_include_synopsis
.in
.sp
.fi
-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\.
.nf
.SH Documentation
.sp
File "test/generators/man/Include2.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Include2.3o _build/default/test/generators/man/Include2.3o.gen
diff --git a/_build/default/test/generators/man/Include2.3o b/_build/default/test/generators/man/Include2.3o.gen
index 8228244..0957820 100644
--- a/_build/default/test/generators/man/Include2.3o
+++ b/_build/default/test/generators/man/Include2.3o.gen
@@ -31,7 +31,7 @@ Top-comment of Y\.
.fi
.br
.ti +2
-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\.
.nf
.sp
\f[CB]module\fR Y_include_doc : \f[CB]sig\fR \.\.\. \f[CB]end\fR
File "test/generators/html/Include_sections.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Include_sections.html _build/default/test/generators/html/Include_sections.html.gen
diff --git a/_build/default/test/generators/html/Include_sections.html b/_build/default/test/generators/html/Include_sections.html.gen
index 86e5936..7d7f509 100644
--- a/_build/default/test/generators/html/Include_sections.html
+++ b/_build/default/test/generators/html/Include_sections.html.gen
@@ -17,19 +17,19 @@
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
<ul>
-     <li><a href="#something-1">Something 1</a>
-      <ul><li><a href="#something-2">Something 2</a></li></ul>
-     </li><li><a href="#something-1-bis">Something 1-bis</a></li>
-     <li><a href="#second-include">Second include</a>
+     <li><a href="#-something-1"> Something 1</a>
+      <ul><li><a href="#-something-2"> Something 2</a></li></ul>
+     </li><li><a href="#-something-1-bis"> Something 1-bis</a></li>
+     <li><a href="#-second-include"> Second include</a>
<ul>
-       <li><a href="#something-1_2">Something 1</a>
-        <ul><li><a href="#something-2_2">Something 2</a></li></ul>
-       </li><li><a href="#something-1-bis_2">Something 1-bis</a></li>
-       <li><a href="#third-include">Third include</a>
+       <li><a href="#-something-1_2"> Something 1</a>
+        <ul><li><a href="#-something-2_2"> Something 2</a></li></ul>
+       </li><li><a href="#-something-1-bis_2"> Something 1-bis</a></li>
+       <li><a href="#-third-include"> Third include</a>
<ul>
-         <li><a href="#something-1_3">Something 1</a>
-          <ul><li><a href="#something-2_3">Something 2</a></li></ul>
-         </li><li><a href="#something-1-bis_3">Something 1-bis</a></li>
+         <li><a href="#-something-1_3"> Something 1</a>
+          <ul><li><a href="#-something-2_3"> Something 2</a></li></ul>
+         </li><li><a href="#-something-1-bis_3"> Something 1-bis</a></li>
</ul>
</li>
</ul>
@@ -57,44 +57,46 @@
<code>Something</code>
</a> once
</p>
-   <h2 id="something-1"><a href="#something-1" class="anchor"></a>Something 1
+   <h2 id="-something-1"><a href="#-something-1" class="anchor"></a> 
+    Something 1
</h2><p>foo</p>
-   <h3 id="something-2"><a href="#something-2" class="anchor"></a>Something 2
+   <h3 id="-something-2"><a href="#-something-2" class="anchor"></a> 
+    Something 2
</h3>
-   <h2 id="something-1-bis"><a href="#something-1-bis" class="anchor"></a>
-    Something 1-bis
+   <h2 id="-something-1-bis"><a href="#-something-1-bis" class="anchor"></a>
+     Something 1-bis
</h2><p>Some text.</p>
-   <h2 id="second-include"><a href="#second-include" class="anchor"></a>
-    Second include
+   <h2 id="-second-include"><a href="#-second-include" class="anchor"></a>
+     Second include
</h2>
<p>Let's include
<a href="Include_sections-module-type-Something.html">
<code>Something</code>
</a> a second time: the heading level should be shift here.
</p>
-   <h3 id="something-1_2"><a href="#something-1_2" class="anchor"></a>
-    Something 1
+   <h3 id="-something-1_2"><a href="#-something-1_2" class="anchor"></a>
+     Something 1
</h3><p>foo</p>
-   <h4 id="something-2_2"><a href="#something-2_2" class="anchor"></a>
-    Something 2
+   <h4 id="-something-2_2"><a href="#-something-2_2" class="anchor"></a>
+     Something 2
</h4>
-   <h3 id="something-1-bis_2">
-    <a href="#something-1-bis_2" class="anchor"></a>Something 1-bis
+   <h3 id="-something-1-bis_2">
+    <a href="#-something-1-bis_2" class="anchor"></a> Something 1-bis
</h3><p>Some text.</p>
-   <h3 id="third-include"><a href="#third-include" class="anchor"></a>
-    Third include
+   <h3 id="-third-include"><a href="#-third-include" class="anchor"></a>
+     Third include
</h3><p>Shifted some more.</p>
-   <h4 id="something-1_3"><a href="#something-1_3" class="anchor"></a>
-    Something 1
+   <h4 id="-something-1_3"><a href="#-something-1_3" class="anchor"></a>
+     Something 1
</h4><p>foo</p>
-   <h5 id="something-2_3"><a href="#something-2_3" class="anchor"></a>
-    Something 2
+   <h5 id="-something-2_3"><a href="#-something-2_3" class="anchor"></a>
+     Something 2
</h5>
-   <h4 id="something-1-bis_3">
-    <a href="#something-1-bis_3" class="anchor"></a>Something 1-bis
+   <h4 id="-something-1-bis_3">
+    <a href="#-something-1-bis_3" class="anchor"></a> Something 1-bis
</h4><p>Some text.</p>
<p>And let's include it again, but without inlining it this time:
-    the ToC shouldn't grow.
+    the ToC  shouldn't grow.
</p>
<div class="odoc-include">
<details open="open">
@@ -112,8 +114,8 @@
</code>
</div>
</div>
-     <h2 id="something-1_4"><a href="#something-1_4" class="anchor"></a>
-      Something 1
+     <h2 id="-something-1_4"><a href="#-something-1_4" class="anchor"></a>
+       Something 1
</h2><p>foo</p>
<div class="odoc-spec">
<div class="spec value anchored" id="val-foo">
@@ -121,8 +123,8 @@
<code><span><span class="keyword">val</span> foo : unit</span></code>
</div>
</div>
-     <h3 id="something-2_4"><a href="#something-2_4" class="anchor"></a>
-      Something 2
+     <h3 id="-something-2_4"><a href="#-something-2_4" class="anchor"></a>
+       Something 2
</h3>
<div class="odoc-spec">
<div class="spec value anchored" id="val-bar">
@@ -130,8 +132,8 @@
<code><span><span class="keyword">val</span> bar : unit</span></code>
</div><div class="spec-doc"><p>foo bar</p></div>
</div>
-     <h2 id="something-1-bis_4">
-      <a href="#something-1-bis_4" class="anchor"></a>Something 1-bis
+     <h2 id="-something-1-bis_4">
+      <a href="#-something-1-bis_4" class="anchor"></a> Something 1-bis
</h2><p>Some text.</p>
</details>
</div>
File "test/generators/html/Include_sections-module-type-Something.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Include_sections-module-type-Something.html _build/default/test/generators/html/Include_sections-module-type-Something.html.gen
diff --git a/_build/default/test/generators/html/Include_sections-module-type-Something.html b/_build/default/test/generators/html/Include_sections-module-type-Something.html.gen
index 3c685aa..8c487ba 100644
--- a/_build/default/test/generators/html/Include_sections-module-type-Something.html
+++ b/_build/default/test/generators/html/Include_sections-module-type-Something.html.gen
@@ -19,9 +19,9 @@
<div class="odoc-tocs">
<nav class="odoc-toc odoc-local-toc">
<ul>
-     <li><a href="#something-1">Something 1</a>
-      <ul><li><a href="#something-2">Something 2</a></li></ul>
-     </li><li><a href="#something-1-bis">Something 1-bis</a></li>
+     <li><a href="#-something-1"> Something 1</a>
+      <ul><li><a href="#-something-2"> Something 2</a></li></ul>
+     </li><li><a href="#-something-1-bis"> Something 1-bis</a></li>
</ul>
</nav>
</div>
@@ -33,7 +33,8 @@
</code>
</div>
</div>
-   <h2 id="something-1"><a href="#something-1" class="anchor"></a>Something 1
+   <h2 id="-something-1"><a href="#-something-1" class="anchor"></a> 
+    Something 1
</h2><p>foo</p>
<div class="odoc-spec">
<div class="spec value anchored" id="val-foo">
@@ -41,7 +42,8 @@
<code><span><span class="keyword">val</span> foo : unit</span></code>
</div>
</div>
-   <h3 id="something-2"><a href="#something-2" class="anchor"></a>Something 2
+   <h3 id="-something-2"><a href="#-something-2" class="anchor"></a> 
+    Something 2
</h3>
<div class="odoc-spec">
<div class="spec value anchored" id="val-bar">
@@ -49,8 +51,8 @@
<code><span><span class="keyword">val</span> bar : unit</span></code>
</div><div class="spec-doc"><p>foo bar</p></div>
</div>
-   <h2 id="something-1-bis"><a href="#something-1-bis" class="anchor"></a>
-    Something 1-bis
+   <h2 id="-something-1-bis"><a href="#-something-1-bis" class="anchor"></a>
+     Something 1-bis
</h2><p>Some text.</p>
</div>
</body>
File "test/generators/latex/Include_sections.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Include_sections.tex _build/default/test/generators/latex/Include_sections.tex.gen
diff --git a/_build/default/test/generators/latex/Include_sections.tex b/_build/default/test/generators/latex/Include_sections.tex.gen
index b87537b..fba6d4b 100644
--- a/_build/default/test/generators/latex/Include_sections.tex
+++ b/_build/default/test/generators/latex/Include_sections.tex.gen
@@ -1,13 +1,13 @@
\section{Module \ocamlinlinecode{Include\_\allowbreak{}sections}}\label{Include_sections}%
\label{Include_sections-module-type-Something}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Include_sections-module-type-Something-val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
-\subsubsection{Something 1\label{something-1}}%
+\subsubsection{ Something 1\label{-something-1}}%
foo


\label{Include_sections-module-type-Something-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\\
-\subsubsection{Something 2\label{something-2}}%
+\subsubsection{ Something 2\label{-something-2}}%
\label{Include_sections-module-type-Something-val-bar}\ocamlcodefragment{\ocamltag{keyword}{val} bar : unit}\begin{ocamlindent}foo bar\end{ocamlindent}%
\medbreak
-\subsubsection{Something 1-bis\label{something-1-bis}}%
+\subsubsection{ Something 1-bis\label{-something-1-bis}}%
Some text.


\end{ocamlindent}%
@@ -15,44 +15,44 @@ Some text.
\medbreak
Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} once


-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1_2}}%
+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{ Something 1\label{-something-1_2}}%
foo


-\subsubsection{Something 2\label{something-2_2}}%
-\subsection{Something 1-bis\label{something-1-bis_2}}%
+\subsubsection{ Something 2\label{-something-2_2}}%
+\subsection{ Something 1-bis\label{-something-1-bis_2}}%
Some text.


-\subsection{Second include\label{second-include}}%
+\subsection{ Second include\label{-second-include}}%
Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} a second time: the heading level should be shift here.


-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1_3}}%
+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{ Something 1\label{-something-1_3}}%
foo


-\subsubsection{Something 2\label{something-2_3}}%
-\subsection{Something 1-bis\label{something-1-bis_3}}%
+\subsubsection{ Something 2\label{-something-2_3}}%
+\subsection{ Something 1-bis\label{-something-1-bis_3}}%
Some text.


-\subsubsection{Third include\label{third-include}}%
+\subsubsection{ Third include\label{-third-include}}%
Shifted some more.


-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{something-1_4}}%
+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{ Something 1\label{-something-1_4}}%
foo


-\subsubsection{Something 2\label{something-2_4}}%
-\subsection{Something 1-bis\label{something-1-bis_4}}%
+\subsubsection{ Something 2\label{-something-2_4}}%
+\subsection{ Something 1-bis\label{-something-1-bis_4}}%
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.


\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\label{Include_sections-val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
-\subsection{Something 1\label{something-1_5}}%
+\subsection{ Something 1\label{-something-1_5}}%
foo


\label{Include_sections-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : unit}\\
-\subsubsection{Something 2\label{something-2_5}}%
+\subsubsection{ Something 2\label{-something-2_5}}%
\label{Include_sections-val-bar}\ocamlcodefragment{\ocamltag{keyword}{val} bar : unit}\begin{ocamlindent}foo bar\end{ocamlindent}%
\medbreak
-\subsection{Something 1-bis\label{something-1-bis_5}}%
+\subsection{ Something 1-bis\label{-something-1-bis_5}}%
Some text.


File "test/generators/man/Include_sections.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Include_sections.3o _build/default/test/generators/man/Include_sections.3o.gen
diff --git a/_build/default/test/generators/man/Include_sections.3o b/_build/default/test/generators/man/Include_sections.3o.gen
index 13cce5a..dcd1148 100644
--- a/_build/default/test/generators/man/Include_sections.3o
+++ b/_build/default/test/generators/man/Include_sections.3o.gen
@@ -17,7 +17,7 @@ Include_sections
\f[CB]val\fR something : unit
.sp
.ti +2
-\fB1\.1 Something 1\fR
+\fB1\.1  Something 1\fR
.sp
.ti +2
.fi
@@ -28,7 +28,7 @@ foo
\f[CB]val\fR foo : unit
.sp
.ti +2
-\fB1\.1\.1 Something 2\fR
+\fB1\.1\.1  Something 2\fR
.sp
.ti +2
\f[CB]val\fR bar : unit
@@ -39,7 +39,7 @@ foo bar
.nf
.sp
.ti +2
-\fB1\.2 Something 1-bis\fR
+\fB1\.2  Something 1-bis\fR
.sp
.ti +2
.fi
@@ -59,7 +59,7 @@ Let's include \f[CI]Something\fR once
.nf
.sp
.in 3
-\fB2 Something 1\fR
+\fB2  Something 1\fR
.in
.sp
.fi
@@ -67,11 +67,11 @@ foo
.nf
.sp
.in 4
-\fB2\.1 Something 2\fR
+\fB2\.1  Something 2\fR
.in
.sp
.in 3
-\fB3 Something 1-bis\fR
+\fB3  Something 1-bis\fR
.in
.sp
.fi
@@ -79,7 +79,7 @@ Some text\.
.nf
.sp
.in 3
-\fB4 Second include\fR
+\fB4  Second include\fR
.in
.sp
.fi
@@ -87,7 +87,7 @@ Let's include \f[CI]Something\fR a second time: the heading level should be shif
.nf
.sp
.in 4
-\fB4\.1 Something 1\fR
+\fB4\.1  Something 1\fR
.in
.sp
.fi
@@ -95,11 +95,11 @@ foo
.nf
.sp
.in 5
-\fB4\.1\.1 Something 2\fR
+\fB4\.1\.1  Something 2\fR
.in
.sp
.in 4
-\fB4\.2 Something 1-bis\fR
+\fB4\.2  Something 1-bis\fR
.in
.sp
.fi
@@ -107,7 +107,7 @@ Some text\.
.nf
.sp
.in 4
-\fB4\.3 Third include\fR
+\fB4\.3  Third include\fR
.in
.sp
.fi
@@ -115,7 +115,7 @@ Shifted some more\.
.nf
.sp
.in 5
-\fB4\.3\.1 Something 1\fR
+\fB4\.3\.1  Something 1\fR
.in
.sp
.fi
@@ -123,11 +123,11 @@ foo
.nf
.sp
.in 6
-\fBSomething 2\fR
+\fB Something 2\fR
.in
.sp
.in 5
-\fB4\.3\.2 Something 1-bis\fR
+\fB4\.3\.2  Something 1-bis\fR
.in
.sp
.fi
@@ -135,13 +135,13 @@ Some text\.
.nf
.sp
.fi
-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\.
.nf
.sp
\f[CB]val\fR something : unit
.sp
.in 5
-\fB4\.3\.3 Something 1\fR
+\fB4\.3\.3  Something 1\fR
.in
.sp
.fi
@@ -151,7 +151,7 @@ foo
\f[CB]val\fR foo : unit
.sp
.in 6
-\fBSomething 2\fR
+\fB Something 2\fR
.in
.sp
\f[CB]val\fR bar : unit
@@ -162,7 +162,7 @@ foo bar
.nf
.sp
.in 5
-\fB4\.3\.4 Something 1-bis\fR
+\fB4\.3\.4  Something 1-bis\fR
.in
.sp
.fi
File "test/generators/html/Bugs_post_406.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Bugs_post_406.html _build/default/test/generators/html/Bugs_post_406.html.gen
diff --git a/_build/default/test/generators/html/Bugs_post_406.html b/_build/default/test/generators/html/Bugs_post_406.html.gen
index f066e2d..32d5baa 100644
--- a/_build/default/test/generators/html/Bugs_post_406.html
+++ b/_build/default/test/generators/html/Bugs_post_406.html.gen
@@ -14,7 +14,7 @@
<header class="odoc-preamble">
<h1>Module <code><span>Bugs_post_406</span></code></h1>
<p>Let-open in class types, https://github.com/ocaml/odoc/issues/543
-     This was added to the language in 4.06
+      This was added to the language in 4.06
</p>
</header>
<div class="odoc-content">
File "test/generators/latex/Bugs_post_406.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Bugs_post_406.tex _build/default/test/generators/latex/Bugs_post_406.tex.gen
diff --git a/_build/default/test/generators/latex/Bugs_post_406.tex b/_build/default/test/generators/latex/Bugs_post_406.tex.gen
index 20f3806..8e78425 100644
--- a/_build/default/test/generators/latex/Bugs_post_406.tex
+++ b/_build/default/test/generators/latex/Bugs_post_406.tex.gen
@@ -1,5 +1,5 @@
\section{Module \ocamlinlinecode{Bugs\_\allowbreak{}post\_\allowbreak{}406}}\label{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


\label{Bugs_post_406-class-type-let_open}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type}  \hyperref[Bugs_post_406-class-type-let_open]{\ocamlinlinecode{let\_\allowbreak{}open}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
File "test/generators/man/Bugs_post_406.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Bugs_post_406.3o _build/default/test/generators/man/Bugs_post_406.3o.gen
diff --git a/_build/default/test/generators/man/Bugs_post_406.3o b/_build/default/test/generators/man/Bugs_post_406.3o.gen
index fcfc84e..b28e27c 100644
--- a/_build/default/test/generators/man/Bugs_post_406.3o
+++ b/_build/default/test/generators/man/Bugs_post_406.3o.gen
@@ -9,7 +9,7 @@ Bugs_post_406
.in
.sp
.fi
-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
.nf
.SH Documentation
.sp
File "test/generators/html/Bugs.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Bugs.html _build/default/test/generators/html/Bugs.html.gen
diff --git a/_build/default/test/generators/html/Bugs.html b/_build/default/test/generators/html/Bugs.html.gen
index 94e3cf2..2b76529 100644
--- a/_build/default/test/generators/html/Bugs.html
+++ b/_build/default/test/generators/html/Bugs.html.gen
@@ -36,7 +36,7 @@
</code>
</div>
<div class="spec-doc">
-     <p>Triggers an assertion failure when 
+     <p>Triggers an assertion failure when  
<a href="https://github.com/ocaml/odoc/issues/101">
https://github.com/ocaml/odoc/issues/101
</a> is not fixed.
File "test/generators/latex/Bugs.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Bugs.tex _build/default/test/generators/latex/Bugs.tex.gen
diff --git a/_build/default/test/generators/latex/Bugs.tex b/_build/default/test/generators/latex/Bugs.tex.gen
index 918325c..728d490 100644
--- a/_build/default/test/generators/latex/Bugs.tex
+++ b/_build/default/test/generators/latex/Bugs.tex.gen
@@ -1,6 +1,6 @@
\section{Module \ocamlinlinecode{Bugs}}\label{Bugs}%
\label{Bugs-type-opt}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt = \ocamltag{type-var}{'a} option}\\
-\label{Bugs-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Triggers an assertion failure when \href{https://github.com/ocaml/odoc/issues/101}{https://github.com/ocaml/odoc/issues/101}\footnote{\url{https://github.com/ocaml/odoc/issues/101}} is not fixed.\end{ocamlindent}%
+\label{Bugs-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Triggers an assertion failure when  \href{https://github.com/ocaml/odoc/issues/101}{https://github.com/ocaml/odoc/issues/101}\footnote{\url{https://github.com/ocaml/odoc/issues/101}} is not fixed.\end{ocamlindent}%
\medbreak
\label{Bugs-val-repeat}\ocamlcodefragment{\ocamltag{keyword}{val} repeat : \ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'b} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b} * \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b}}\begin{ocamlindent}Renders as \ocamlinlinecode{val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f} before https://github.com/ocaml/odoc/pull/1173\end{ocamlindent}%
\medbreak
File "test/generators/man/Bugs.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Bugs.3o _build/default/test/generators/man/Bugs.3o.gen
diff --git a/_build/default/test/generators/man/Bugs.3o b/_build/default/test/generators/man/Bugs.3o.gen
index e06e4f9..ba8365d 100644
--- a/_build/default/test/generators/man/Bugs.3o
+++ b/_build/default/test/generators/man/Bugs.3o.gen
@@ -17,7 +17,7 @@ Bugs
.fi
.br
.ti +2
-Triggers an assertion failure when 
+Triggers an assertion failure when  
.UR https://github.com/ocaml/odoc/issues/101
https://github\.com/ocaml/odoc/issues/101
.UE
File "test/generators/html/Alias-X.html", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/html/Alias-X.html _build/default/test/generators/html/Alias-X.html.gen
diff --git a/_build/default/test/generators/html/Alias-X.html b/_build/default/test/generators/html/Alias-X.html.gen
index 3c63714..4ba8bee 100644
--- a/_build/default/test/generators/html/Alias-X.html
+++ b/_build/default/test/generators/html/Alias-X.html.gen
@@ -25,7 +25,7 @@
</div>
<div class="spec-doc">
<p>Module Foo__X documentation. This should appear in the documentation
-       for the alias to this module 'X'
+        for the alias to this module 'X'
</p>
</div>
</div>
File "test/generators/man/Alias.X.3o", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/man/Alias.X.3o _build/default/test/generators/man/Alias.X.3o.gen
diff --git a/_build/default/test/generators/man/Alias.X.3o b/_build/default/test/generators/man/Alias.X.3o.gen
index 946f977..872bd0c 100644
--- a/_build/default/test/generators/man/Alias.X.3o
+++ b/_build/default/test/generators/man/Alias.X.3o.gen
@@ -15,6 +15,6 @@ Alias\.X
.fi
.br
.ti +2
-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'
.nf


File "test/generators/latex/Alias.X.tex", line 1, characters 0-0:
/usr/bin/git --no-pager diff --no-index --color=always -u _build/default/test/generators/latex/Alias.X.tex _build/default/test/generators/latex/Alias.X.tex.gen
diff --git a/_build/default/test/generators/latex/Alias.X.tex b/_build/default/test/generators/latex/Alias.X.tex.gen
index 00e1e70..02f5d64 100644
--- a/_build/default/test/generators/latex/Alias.X.tex
+++ b/_build/default/test/generators/latex/Alias.X.tex.gen
@@ -1,5 +1,5 @@
\section{Module \ocamlinlinecode{Alias.\allowbreak{}X}}\label{Alias-X}%
-\label{Alias-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\begin{ocamlindent}Module Foo\_\_X documentation. This should appear in the documentation for the alias to this module 'X'\end{ocamlindent}%
+\label{Alias-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\begin{ocamlindent}Module Foo\_\_X documentation. This should appear in the documentation  for the alias to this module 'X'\end{ocamlindent}%
\medbreak


File "sherlodoc/test/dune", lines 1-12, characters 0-231:
1 | (rule
2 |  (target
3 |   (dir docs))
....
10 |    (run mkdir -p docs)
11 |    (run odig odoc --cache-dir=docs --no-pkg-deps --quiet base)
12 |    (run rm docs/html/base/_doc-dir))))
(cd _build/default/sherlodoc/test && /Users/mac1000/.opam/4.14.2/bin/odig odoc --cache-dir=docs --no-pkg-deps --quiet base)
Command exited with code 123.
"/usr/bin/env" "bash" "-c" "cd ./src && opam exec -- dune build --only-packages=sherlodoc,odoc,odoc-parser,odoc-md,odoc-bench @install @check @runtest && rm -rf _build" failed with exit status 1
2025-01-23 10:51.52: Job failed: Failed: Build failed