{"repo":"yorickpeterse/inko-markdown","free":true,"listed":false,"github":"https://github.com/yorickpeterse/inko-markdown","clone":"git clone https://github.com/yorickpeterse/inko-markdown.git","description":"An Inko library for parsing an opinionated dialect of Markdown","language":"Makefile","stars":10,"topics":["commonmark","inko","markdown"],"license":"MPL-2.0","category":"productivity","readme_excerpt":"inko-markdown An opinionated dialect of Markdown, aimed at making it easy to use and maintain, written in Inko. This library started as an experiment in parsing Markdown using conventional LL(k) parsing techniques, rather than the usual approach involving distinct block and inline parsing phases. As it turns out, it's certainly doable provided we bend the rules a little bit. For example, parsing becomes easier if we drop support for indented code blocks and use a slightly different syntax for block quotes. Requirements - Inko 0.19.0 or newer Installation Usage Hello world using inko-markdown: This produces the following HTML: For more information, refer to the API documentation. Filters Filters are used to transform HTML documents generated from Markdown documents. Filters implement the trait markdown.html.Filter , and modify documents in place. Filters are used as follows: TableOfContents The filter markdown.html.TableOfContents adds id attributes to all headings based on their content, and optionally replaces custom blocks with the toc tag with a table of contents. For example, consider the following Markdown document: When converting this to HTML and applying this filter, the output is transformed into the following: Headings can be ignored by wrapping the contents in an inline span with the class \"toc-ignore\" like so: For this to work, the span must be the outer-most and first element in the heading, i.e. this won't work: Differences with Markdown To make parsing easier (","default_branch":null,"files":null,"tree":[],"storefront":"/r/yorickpeterse","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/yorickpeterse/inko-markdown/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}