#markdown-parser #markdown #markdown-syntax #markdown-html #error-reporting #style #figure

bin+lib markdowny

Markdown parser with support for hairy templates, HTML, HTML-attributes, HTML-spans, HTML-blocks specified in Markdown. Focus on error reporting, so Markdown errors are reported

6 releases (3 breaking)

0.4.0 May 3, 2024
0.3.0 Dec 10, 2023
0.2.1 Mar 25, 2023
0.1.2 Jun 18, 2022
0.1.1 May 29, 2022

#756 in Parser implementations

Download history 5/week @ 2024-02-22 2/week @ 2024-02-29 2/week @ 2024-03-14 26/week @ 2024-03-28 13/week @ 2024-04-04 141/week @ 2024-05-02

141 downloads per month

Apache-2.0

565KB
12K SLoC

markdowny

A Markdown parser, 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}.

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 syntect feature is enabled);
  • converts math to mathml (if latex2mathml feature is enabled);
  • creates figures (start blockquote with figure_type #reference_key: caption, figure type can be listing/figure/etc, #reference_key can be used in links);
  • resolves section and figure counters (start headings and figures with ?, if link body contains ?, replace by actual number).

Dependencies

~2–10MB
~89K SLoC