-
Notifications
You must be signed in to change notification settings - Fork 101
Description
This is certainly due to an underspecification of the ocamldoc language. As you can see here:
http://docs.mirage.io/cmdliner/Cmdliner/index.html#basics
http://erratique.ch/software/cmdliner/doc/Cmdliner#basics
The first code fence has no initial white line, but the second has. This is the result of writing the first one as:
{[mycode]}
and the second one as:
{[
mycode]}
or
{[
mycode
]}
The last two forms are essential for code fences and verbatims that span more than one-line otherwise you cannot write your code sample properly aligned and indented in your sources which makes the source less readable:
{[let x = 3
let y = 4]}
you really want to write:
{[
let x = 3
let y = 3
]}
I'm not sure which rules ocamldoc follows exactly but my gut feeling is that you should simply ignore a newline just after {[ and {v and just before ]} and v}.
(This is not visible for trailing newlines in the html because at that point you end up a block-level element anyways).