Skip to content

Commit 1e096e1

Browse files
christinerosepanglesd
authored andcommitted
line editing ocamldoc_differences.mld
1 parent d6d2257 commit 1e096e1

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

doc/ocamldoc_differences.mld

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{0 Markup Differences from OCamldoc}
1+
{0 Markup Differences From OCamldoc}
22

33
The canonical description of the markup that [odoc] understands is in {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#s%3Aocamldoc-comments}this section}
44
of the OCaml reference manual. The eventual aim is to support the in-code markup
@@ -13,31 +13,31 @@ can be seen rendered by [odoc] {{!Odoc_examples.Markup.Foo}here}.
1313
The following describes the changes between what [odoc] understands and what’s in the OCaml manual.
1414

1515
- Heading levels are more restrictive. In the manual, it suggests any whole number is acceptable. In [odoc],
16-
similarly to the HTML spec, we allow headings from 1-5, and heading level [0] for the title
16+
similarly to the HTML spec, we allow headings from 1-5. Heading level [0] is for the title
1717
of [.mld] files. [odoc] emits a warning for heading levels outside this range and caps them.
1818

1919
{3 Omissions}
20-
- Comments describing class inheritance are not rendered ({{:https://github.com/ocaml/odoc/issues/574}github issue}).
20+
- Comments describing class inheritance are not rendered ({{:https://github.com/ocaml/odoc/issues/574}GitHub issue}).
2121
- [odoc] handles ambiguous documentation comments as the compiler does (see {{:https://caml.inria.fr/pub/docs/manual-ocaml/doccomments.html}here})
2222
rather than treating them as the OCamldoc manual suggests.
23-
- [odoc] doesn’t ignore tags that don't make sense (e.g., [@param] tags on instance variables are rendered) ({{:https://github.com/ocaml/odoc/issues/575}github issue})
24-
- {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#ss:ocamldoc-formatting}Alignment elements} are not handled ([{C text}], [{L text}] and [{R text}]) ({{:https://github.com/ocaml/odoc/issues/541}github issue})
25-
- [odoc] does not recognise {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sss:ocamldoc-html-tags}html tags embedded in comments} ({{:https://github.com/ocaml/odoc/issues/576}github issue})
26-
- [{!indexlist}] is not supported ({{:https://github.com/ocaml/odoc/issues/577}github issue})
23+
- [odoc] doesn’t ignore tags that don't make sense (e.g., [@param] tags on instance variables are rendered) ({{:https://github.com/ocaml/odoc/issues/575}GitHub issue}).
24+
- {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#ss:ocamldoc-formatting}Alignment elements} are not handled ([{C text}], [{L text}], and [{R text}]) ({{:https://github.com/ocaml/odoc/issues/541}GitHub issue}).
25+
- [odoc] does not recognise {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sss:ocamldoc-html-tags}HTML tags embedded in comments} ({{:https://github.com/ocaml/odoc/issues/576}GitHub issue}).
26+
- [{!indexlist}] is not supported ({{:https://github.com/ocaml/odoc/issues/577}GitHub issue}).
2727
- The first paragraph is used for synopses instead of the {{:https://caml.inria.fr/pub/docs/manual-ocaml/ocamldoc.html#sss:ocamldoc-preamble}first sentence}.
2828
Synopses are used when rendering declarations (of modules, classes, etc.) and [{!modules:...}] lists.
29-
An other difference is that documentation starting with a heading or something that is not a paragraph won't have a synopsis ({{:https://github.com/ocaml/odoc/pull/643}github issue}).
29+
Another difference is that documentation starting with a heading or something that is not a paragraph won't have a synopsis ({{:https://github.com/ocaml/odoc/pull/643}GitHub issue}).
3030

3131
{3 Improvements}
3232
- [odoc] supports writing mathematics and tables with a specific syntax.
3333
- [odoc] has a better mechanism for disambiguating references in comments. See 'reference syntax' later in this document.
3434
- Built-in support for standalone [.mld] files. These are documents using the OCamldoc markup, but they’re rendered as distinct pages.
3535
- Structured output: [odoc] can produce output in a structured directory tree rather a set of files.
3636
- A few extra tags are supported:
37-
+ [@returns] is a synonym for [@return]
38-
+ [@raises] is a synonym for [@raise]
39-
+ [@open] and [@closed] and [@inline] are hints for how 'included' signatures should be rendered
40-
+ [@canonical] allows a definition of a [module], [module type] or [type] to be marked as canonically elsewhere.
37+
+ [@returns] is a synonym for [@return].
38+
+ [@raises] is a synonym for [@raise].
39+
+ [@open] and [@closed] and [@inline] are hints for how 'included' signatures should be rendered.
40+
+ [@canonical] allows a definition of a [module], [module type], or [type] to be marked as canonically elsewhere.
4141

4242
{2 Reference Syntax}
4343
[odoc] has a far more powerful reference resolution mechanism than OCamldoc. While it supports the mechanism in OCamldoc used for disambiguating between different types of references,
@@ -46,25 +46,25 @@ where the reference manual suggests the syntax [{!type:Foo.Bar.t}] to designate
4646
comments would be [{!Foo.Bar.type-t}] and [{!Foo.Bar.val-t}]. This allows [odoc] to disambiguate when there are other ambiguous elements within the path. For example, we can
4747
distinguish between a type or [value t] within a module or module type with the same name: [{!module-Foo.module-type-Bar.type-t}] or [{!module-type-Foo.module-Bar.val-t}].
4848

49-
Additionally we support extra annotations:
50-
- [module-type] is a replacement for [modtype]
51-
- [class-type] is a replacement for [classtype]
52-
- [exn] is recognised as [exception]
53-
- [extension] refers to a type extension
54-
- [extension-decl] refers to the declaration point of an extension constructor
55-
- [field] is a replacement for [recfield]
56-
- [instance-variable] refers to instance variables
57-
- [label] refers to labels introduced in anchors
58-
- [page] refers to [.mld] pages as outlined above
59-
- [value] is recognised as [val]
49+
Additionally, we support extra annotations:
50+
- [module-type] is a replacement for [modtype].
51+
- [class-type] is a replacement for [classtype].
52+
- [exn] is recognised as [exception].
53+
- [extension] refers to a type extension.
54+
- [extension-decl] refers to the declaration point of an extension constructor.
55+
- [field] is a replacement for [recfield].
56+
- [instance-variable] refers to instance variables.
57+
- [label] refers to labels introduced in anchors.
58+
- [page] refers to [.mld] pages as outlined above.
59+
- [value] is recognised as [val].
6060

61-
Moreover, [odoc] adds support for referencing of polymorphic variants in type
61+
Moreover, [odoc] adds support for referencing polymorphic variants in type
6262
aliases such as [type t = [ `A ]]. The [constructor] annotation is extended for
6363
polymorphic variants.
6464

65-
{3 Referencing items containing hyphens or dots}
65+
{3 Referencing Items Containing Hyphens or Dots}
6666

67-
If it is necessary to reference a reference that contains hyphens or dots - e.g. if you have a file [docs-with-dashes.mld] or
68-
[docs.with.dots.mld], to reference them use quotation marks in the reference. For the previous two examples, the references
67+
If it is necessary to reference a reference that contains hyphens or dots (e.g., if you have a file [docs-with-dashes.mld] or
68+
[docs.with.dots.mld]) use quotation marks in the reference. For the previous two examples, the references
6969
would be [{!page-"docs-with-dashes"}] and [{!page-"docs.with.dots"}].
7070

0 commit comments

Comments
 (0)