Re: Flexible Markdown Parser

Andrei Fangli andrei_fangli at
Sun Sep 14 09:48:32 EDT 2014


I’ll fork the repo and convert the tests cases to C# unit tests in a separate branch.

Andrei Fangli

From: Michel Fortin
Sent: ‎Sunday‎, ‎14‎ ‎September‎ ‎2014 ‎14‎:‎14
To: markdown-discuss at

Le 14-sept.-2014 à 6:34, Andrei Fangli <andrei_fangli at> a écrit :

> Hello again,
> I’m happy to announce that I have a working parser fully based on regex and a default implementation for Markdown based on Gruber’s Markdown 1.0.1 (Dec 2004) specification. The only thing I could not figure out is the blank line between list items to generate a paragraph in the list item instead of plain text (that is very ambiguous to me and sounds a bit odd) and instead I decided that all list items cannot contain plain text (a very simple approach, I know).

The rule used in is that if there is a blank line separating two list items, both the item above and the item below that blank line will be parsed as block content (and have paragraphs). That said, sublists are parsed anyway regardless of blank lines.

> A preview site is up and running:
> Critics and comments are welcomed.
> PS: can someone point me to some test suites you use? I would like more test cases (the ones I wrote are really rudimentary). Also big documents for performance testing would be nice.

You can use [MDTest][1] which includes the original MarkdownTest test suite from John Gruber as well as my own test suite for PHP Markdown and PHP Markdown Extra.


Michel Fortin
michel.fortin at

Markdown-Discuss mailing list
Markdown-Discuss at
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Markdown-Discuss mailing list