Skip to content

Commit f92fe52

Browse files
panglesddbuenzli
authored andcommitted
Improve docs on code blocks
Co-authored-by: Daniel Bünzli <daniel.buenzli@erratique.ch>
1 parent 315f9e1 commit f92fe52

File tree

1 file changed

+6
-11
lines changed

1 file changed

+6
-11
lines changed

doc/odoc_for_authors.mld

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -399,19 +399,14 @@ Odoc strips whitespace from the content of a codeblock, so that it contains only
399399
]}
400400
v}
401401

402-
In other words, [odoc]:
402+
In other words, [odoc], in order:
403403
{ol
404-
{- Removes the first line if it contains only whitespace,}
405-
{- Removes the last line if it contains only whitespace,}
406-
{- Deindents as much as the opening curly brace's column. If there is
407-
non-whitespace on the left of the box above, the content is deindented only as
408-
much as it can without stripping non-whitespace, and a warning is raised.}}
404+
{- Does not remove any content if [{\[] and [\]}] are on the same line.}
405+
{- Removes the content of the line after [{\[] if it contains only whitespace.}
406+
{- Removes the content of the line before [\]}] if it contains only whitespace.}
407+
{- Removes spaces and tabs (counted as a single spaces) to reach the column of the opening curly brace of the [{\[] marker. If there is non-whitespace on the left of this column, the content is deindented only as much as it can without stripping non-whitespace, and a warning is raised.}}
409408

410-
Note that removal of lines are meant "including the newline character" (so,
411-
nothing is removed if there is no newline character: [{[ content ]}] stays the
412-
same, but so do [{[ ]}]).
413-
414-
Also, note that if point 1 above does not remove a line, the content of the code
409+
Also, note that if point 2 above does not remove a line, the content of the code
415410
block is considered as if starting at the upper [+] in the box above:
416411

417412
{delim@ocaml[

0 commit comments

Comments
 (0)