Skip to content

Commit 1694d05

Browse files
committed
Minor doc changes suggested on #914
1 parent d4fba84 commit 1694d05

File tree

4 files changed

+15
-22
lines changed

4 files changed

+15
-22
lines changed

CHANGES.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
2.2.0
2+
-----
3+
14
Additions
2-
- New (experimental!) option `--as-json` for the HTML renderer that emits HTML
5+
- New unstable option `--as-json` for the HTML renderer that emits HTML
36
fragments (preamble, content) together with metadata (table of contents,
47
breadcrumbs, whether katex is used) in JSON format. (@sabine, #908)
58
- New maths support via `{m ... }` and `{math ... }` tags. (@giltho, @gpetiot, #886)

doc/driver.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The document built here includes not only the documentation of `odoc` itself, bu
66
docs for a subset of `odoc`'s dependent libraries to show how this may be done. For a much more
77
complete and comprehensive use of `odoc`, see the [Voodoo project](https://github.com/ocaml-doc/voodoo), the tool that is being used to build
88
the package docs for
9-
[v3.ocaml.org](https://v3.ocaml.org/).
9+
[www.ocaml.org/packages](https://www.ocaml.org/packages).
1010

1111
First we need to initialise MDX with some libraries and helpful values.
1212

doc/odoc_for_authors.mld

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ v}
3030
- {{!page-driver}The reference driver} is the simplest driver, useful if you
3131
want to see how to integrate it with your own projects.
3232
- {{:https://github.com/ocaml-doc/voodoo}Voodoo} is the driver used to create
33-
the docs for {{:https://v3.ocaml.org/packages}the new OCaml website}.
33+
the docs for {{:https://www.ocaml.org/packages}the OCaml website}.
3434

3535
{1:interfaces Documenting your interfaces}
3636

@@ -296,22 +296,10 @@ v}
296296

297297
{4:language_headers Language Headers}
298298

299-
As of [odoc.2.1] it is possible to write blocks with explicit language headers,
300-
similar to markdown code blocks:
301-
302-
{@markdown[
303-
Here is some python code:
304-
```python
305-
def f():
306-
return 0
307-
```
308-
]}
309-
310-
These blocks can be written using the enclosing tags [ {@<language>[ ... ]} ].
311-
The content of those block should be properly styled if odoc supports the
312-
styling for the given language. It is encouraged to use them even before proper
313-
support is available so that you benefit from it as soon as it is released.
314-
The above markdown example would be written as:
299+
As of [odoc.2.2] it is possible to write blocks with explicit language headers.
300+
These blocks can be written using the enclosing tags [{@<language>[ ... ]}].
301+
The content of those block should be properly styled if highlightjs supports the
302+
styling for the given language.
315303

316304
{v
317305
(** Here is some python code:
@@ -333,7 +321,7 @@ Here is some python code:
333321
{4:verbatim_blocks Verbatim Blocks}
334322

335323
It is possible to write language agnostic code blocks, also called verbatim
336-
blocks using the enclosing tags [ {v ... v} ]. The content of these blocks will be
324+
blocks using the enclosing tags [{v ... v}]. The content of these blocks will be
337325
formatted as code but with no particular style applied.
338326

339327
{[
@@ -346,7 +334,7 @@ formatted as code but with no particular style applied.
346334

347335
{3:escaping Escaping}
348336

349-
In most contexts, the characters [ { [ ] } @ ] all need to be escaped with a backslash.
337+
In most contexts, the characters [{ [ ] } @] all need to be escaped with a backslash.
350338
In inline source code style, only square brackets need to be escaped. However, as a
351339
convenience, {e matched} square brackets need not be escaped to aid in typesetting
352340
code. For example, the following would be acceptable in a documentation comment:

src/odoc/bin/main.ml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,9 @@ module Odoc_html_args = struct
563563
let doc =
564564
"EXPERIMENTAL: Output HTML files in 'embeddable json' mode, where HTML \
565565
fragments (preamble, content) together with metadata (uses_katex, \
566-
breadcrumbs, table of contents) are emitted in JSON format."
566+
breadcrumbs, table of contents) are emitted in JSON format. The \
567+
structure of the output should be considered unstable and no \
568+
guarantees are made about backward compatibility."
567569
in
568570
Arg.(value & flag & info ~doc [ "as-json" ])
569571

0 commit comments

Comments
 (0)