Go to file
Jerry James 77b6a5c5ef Add patch to adapt tests to cmdliner 1.1.0. 2022-09-20 11:33:29 -06:00
.gitignore Initial import. 2022-01-07 11:27:42 -07:00
README.md Initial import. 2022-01-07 11:27:42 -07:00
ocaml-mdx-cmdliner.patch Add patch to adapt tests to cmdliner 1.1.0. 2022-09-20 11:33:29 -06:00
ocaml-mdx.spec Add patch to adapt tests to cmdliner 1.1.0. 2022-09-20 11:33:29 -06:00
sources Version 2.1.0. 2022-02-03 16:56:42 -07:00

README.md

ocaml-mdx

mdx enables execution of code blocks inside markdown files. There are (currently) two sub-commands, corresponding to two modes of operation: preprocessing (ocaml-mdx pp) and tests (ocaml-mdx test).

The preprocessor mode enables mixing documentation and code, and the practice of "literate programming" using markdown and OCaml.

The test mode enables ensuring that shell scripts and OCaml fragments in the documentation always stay up-to-date.

The blocks in markdown files can be parameterized by mdx-specific labels, that will change the way mdx interprets the block. The syntax is: <!-- $MDX labels -->, where labels is a list of valid labels separated by a comma. This line must immediately precede the block it is attached to.