markdowny
A Markdown parser with strict error handling, generating an AST that can be easily adjusted and converted to text or HTML. It supports some additional syntax:
- spans between
[and]; - divs without block elements (such as div and p) between
[[and]]; - divs with block elements (such as div and p) between
[[[and]]]; - literals between
[[[[and]]]]; - setting styles/classes/ids etc with
{#id; style: value; .classname}. - HTML tags such as
divwith a newline after are assumed to contain block elements. HTML tags without a newline after are assumed to not contain block elements. !is a block level image (not wrapped in<p>)
This library also has a resolve_markdown() function that does a number of things:
- makes sections around headings (h1,h2,..), and make links to them;
- highlight source code (if
syntectfeature is enabled); - converts math to mathml (if
latex2mathmlfeature is enabled); - creates figures (start blockquote with
figure_type #reference_key: caption, figure type can belisting/figure/etc,#reference_keycan be used in links); - resolves section and figure counters (start headings and figures with
?, if link body contains?, replace by actual number).
Neovim LSP config
vim..