Documenting extensions with fenced example blocks
As documentend in README.md, the source file for the specification, spec.txt, uses custom fenced code blocks wherein the info string starts with example .
```````````````````````````````` example
Markdown source
.
expected HTML output
````````````````````````````````
Github has documented their GFM extensions to Commonmark in a file called extensions.txt using the same convention. I wish there was a handy way to include all three, i.e. input, standard HTML output and extended HTML output, in these blocks. The intuitive solution is another dividing line containing only a single period character. I am not sure which output should come first, though.
```````````````````````````````` example
Markdown source
.
expected HTML output in vanilla Commonmark
.
expected HTML output with extension
````````````````````````````````
By the way, in some instances I would have preferred to provide expected output in a different format than HTML, e.g. LaTeX. For such flexibility, there would need to be greater changes to the syntax and the Lua script parsing it.
```````````````````````````````` example
## Heading ## -
.tex
\section*{Heading}
.ast
<heading level="2" info="-">Heading</heading>
.
<h2>Heading</h2>
.
<h2 class="notoc">Heading</h2>
````````````````````````````````