markdeep`# Wrapping Markeep into a Tagged Template
[Markdeep][] is an alternative to Markdown by Morgan McGuire. It features a lot more bells and whistles than the standard Markdown markup language. For example, it has ASCII diagram support:
~~~~~~~~~~~~~~~~none
markdeep\`
*************************************
* _______ *
* .-------. / / .-----. *
* | Write +-+->/ Edit ++->| Share | *
* '-------' ^ /______/ | '-----' *
* | | *
* '--------' *
*************************************
\`
~~~~~~~~~~~~~~~~
*************************************
* _______ *
* .-------. / / .-----. *
* | Write +-+->/ Edit ++->| Share | *
* '-------' ^ /______/ | '-----' *
* | | *
* '--------' *
*************************************
This notebook is an attempt to wrap Markdeep into a tagged template that can easily be used as a drop-in replacement for standard Markdown.
Below I have copied most of raw markup of [the features page](https://casual-effects.com/markdeep/features.md.html), converting it section by section using said template literal.
As you can see, not everything is working yet. For example, rendering ${tex`\TeX`.outerHTML} does not work yet. For now there is a way around that using the existing tagged template literal:
~~~~~~~~~~~~~~~~none
${'${tex`\\TeX`.outerHTML}'}
~~~~~~~~~~~~~~~~
Admittedly, this is a bit of a pain, so hopefully that can be autodetected in the future.
A second limitation is maximum cell size. This may mess up numbering for headers in longer documents.
*~~Another major gotcha is the diagrams: they use\` \ \` for diagonal lines, but those need to be escaped when used in a tagged template literal. See source code of the diagram section below.~~* This was fixed with raw strings and a regex.
[Markdeep]: https://casual-effects.com/markdeep/
`