I've written an implementation of Markdown in C, for people like me who shout BAH! and wave their canes at modern programming languages. (I needed a decent markup language for my website and weblog, and didn't want to have to install any new programming languages on the machine.) Discount <http://www.pell.portland.or.us/~orc/Code/discount> has been in production for the past two and a half months, and is moving slowly enough so that it actually counts as stable. It includes a standalone markdown interpreter, a library, and a couple of sample programs that I use for generating webpages. There are some whoppingly nonstandard extensions: 1. you can configure the interpreter with 8-character tabstops. 2. definition lists, using =item= text =item= text 3. a small stack of smartypantish character substitutions 4. pseudo-protocol extensions - [foo](class:bar) -- wrap foo in <span class=bar> - [foo](id:bar) -- wrap foo in <a id="bar"> - [foo](raw:bar) -- emit bar without any processing 5. size extensions for images, via  6. pandoc-style header blocks 7. <style> block elements, which are squirreled away by the library and can be retrieved by web-page generators. Despite all this, discount still passes MarkdownTest_1.0 when I turn extensions off and turn --tidy on. -david parsons
Nice job! You've got the speed record by a mile! I've played with your program a bit, and so far it does well on most of the edge cases that cause problems for Markdown.pl. But, like Markdown.pl, it generates invalid XHTML for this case: ***strong** in emph* John +++ david parsons [Mar 01 08 11:04 ]: > I've written an implementation of Markdown in C, for people like me > who shout BAH! and wave their canes at modern programming languages. > (I needed a decent markup language for my website and weblog, and > didn't want to have to install any new programming languages on the > machine.) > > Discount <http://www.pell.portland.or.us/~orc/Code/discount> has been in > production for the past two and a half months, and is moving slowly > enough so that it actually counts as stable. It includes a standalone > markdown interpreter, a library, and a couple of sample programs that > I use for generating webpages. > > There are some whoppingly nonstandard extensions: > > 1. you can configure the interpreter with 8-character tabstops. > 2. definition lists, using > =item= > text > =item= > text > 3. a small stack of smartypantish character substitutions > 4. pseudo-protocol extensions > - [foo](class:bar) -- wrap foo in <span class=bar> > - [foo](id:bar) -- wrap foo in <a id="bar"> > - [foo](raw:bar) -- emit bar without any processing > 5. size extensions for images, via>  > 6. pandoc-style header blocks > 7. <style> block elements, which are squirreled away by the > library and can be retrieved by web-page generators. > > > Despite all this, discount still passes MarkdownTest_1.0 when > I turn extensions off and turn --tidy on. > > > > -david parsons > _______________________________________________ > Markdown-Discuss mailing list > Markdown-Discuss at six.pairlist.net > http://six.pairlist.net/mailman/listinfo/markdown-discuss >
Le 2008-03-02 ? 21:47, John MacFarlane a ?crit : > Nice job! You've got the speed record by a mile! > > I've played with your program a bit, and so far it does well on most > of the > edge cases that cause problems for Markdown.pl. But, like Markdown.pl, > it generates invalid XHTML for this case: > > ***strong** in emph* Perhaps it should be passed through MDTest. The PHP Markdown testsuite in MDTest contains a lot of problems which were present in Markdown.pl but which I've fixed now in PHP Markdown; including the above. Michel Fortin michel.fortin at michelf.com http://michelf.com/