Skip to content

Commit efa5024

Browse files
panglesdjonludlam
authored andcommitted
Mention line breaks in code spans in the documentation
Signed-off-by: Paul-Elliot <[email protected]>
1 parent decae21 commit efa5024

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

doc/odoc_for_authors.mld

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,22 @@ For inline, language agnostic source code style, use square brackets: [ [ ... ]
276276
(** Here, [f 0] is [None] *)
277277
]}
278278

279+
Two newlines in a row in an inline codeblock are forbidden, but in the interest
280+
of the 80 char rule, a single newline followed by horizontal space in an inline
281+
codeblock is considered as a single space:
282+
283+
{[
284+
(**
285+
A very loooooooooooooooooooooooong line and [List.map (fun x -> x +1)].
286+
287+
is equivalent to:
288+
289+
A very loooooooooooooooooooooooong line and [List.map
290+
(fun x -> x +1)].
291+
292+
*)
293+
]}
294+
279295
All the other existing ways to insert code are meant to be used for code blocks,
280296
not inline code fragments. Those will be formatted as a code block and will end
281297
the paragraph. Attempting to use them inline will trigger a warning.

0 commit comments

Comments
 (0)