I am testing Literate for writing a module where some functions have docstrings attached.
I noticed that if I am including code-examples or math in the docstrings, then the resulting Code-Blocks in markdown output get split.
Example: The Julia Code
"""
Doc String with math:
```math
π = 3
```
"""
function funny_fun(x) nothing end
will result in Markdown that looks something like
```@example
"""
Doc String with math:
```
and
math
π = 3
```@example
```
"""
function funny_fun(x) nothing end
This of course can break the whole document.
A simple fix is to provide the codefence keyword argument to Literate.markown, specifying to use 4 consecutive backticks instead of 3, i.e.,
codefence = "````@example SomeName" => "````"
I am thinking that maybe this should be the default behavior, at least for documenter output?
Anyways, thanks for the great work!
I am testing Literate for writing a module where some functions have docstrings attached.
I noticed that if I am including code-examples or math in the docstrings, then the resulting Code-Blocks in markdown output get split.
Example: The Julia Code
will result in Markdown that looks something like
and
This of course can break the whole document.
A simple fix is to provide the
codefencekeyword argument toLiterate.markown, specifying to use 4 consecutive backticks instead of 3, i.e.,I am thinking that maybe this should be the default behavior, at least for documenter output?
Anyways, thanks for the great work!