On 14 April 2015 at 23:11, Dmitri Zagidulin <dmitri@zagidulin.net> wrote:
It is super hard to write a parser for MD.
What do you mean? Why?
The syntax depends on indentation and block layout of text. It's very hard to express using the usual grammar tools. In PetitMarkdown, before Jan added indent-aware parsing to PetitParser, I was thinking of doing multi-pass parsing, first recognizing block-level, then inline syntax. The closest thing to a standard is John Gruber's reference implementation, and that is a sequence of regular expression search-and-replace passes. Not exactly what you'd call a grammar :) Anyway⦠https://twitter.com/willmanduffy/status/588057382225346560 -- Damien Pollet type less, do more [ | ] http://people.untyped.org/damien.pollet