You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It should be possible to attach metadata to code blocks. There is two main use-cases:
Running Mdx on OCaml and mld files. It needs per-block configuration.
Code highlighting. The HTML backend adds color highlighting but assumes that all blocks contain OCaml code.
Odoc won't try to interpret or to render them, they would be present in the parse tree but discared afterwards.
During a previous meeting, we proposed the following syntax:
{@language metadata [
]}
The metadata part is an arbitrary string and is optional.
We'd need quoting, I propose wrapping it with double quotes ("") and allowing OCaml's escaping (eg. \" and everything String.escape produces).
The language part is not optional.
For example:
{@sh [
rm -rf /
]}
{@ocaml env=f1 version>=4.06 [
# let x = 1 ;;
val x : 1
]}
The text was updated successfully, but these errors were encountered:
Honestly I rather not add more tools to the basics I need for dev (and especially not tools that do black magic). It doesn't seem super hard to add file extraction to odoc itself by starting from the document IR.
It should be possible to attach metadata to code blocks. There is two main use-cases:
Odoc won't try to interpret or to render them, they would be present in the parse tree but discared afterwards.
During a previous meeting, we proposed the following syntax:
The
metadata
part is an arbitrary string and is optional.We'd need quoting, I propose wrapping it with double quotes (
""
) and allowing OCaml's escaping (eg.\"
and everythingString.escape
produces).The
language
part is not optional.For example:
The text was updated successfully, but these errors were encountered: