Open MisterDA opened 2 years ago
This could be achieved (in code spans, not code blocks) by having a {c ...}
(c
for codespan) which renders as a codespan but contains odoc inline elements instead of plain text.
@panglesd This is a great idea! Personally I prefer {code ...}
over {c ...}
for several reasons: (1) for me it is easier to remember and (2) it matches the HTML tag <code>
, just like {ul/ol/i/b... ...}
and (3) we can still add {c ...}
later on.
I noticed that the Lwt documentation has doc comments like this:
The intent is to have a little code example with a reference to the function used. The output however isn't very nice:
It would be much nicer to merge the consecutive
<code>
tags, and to be able to embed references in these short code blocks. Depending on the document format or the CSS, it can get very ugly. Is there a way to achieve that? If not, could odoc add support for it?They also write this, and the result looks very weird imo:
Thanks.