Parser question + Markdown "wysiwyg"
bodhi at 5263.org
Tue Apr 20 07:59:22 EDT 2010
I've started writing an OS X Markdown "editor" that semi-formats your markdown document as you write it. I just wanted to put something together, so went with a regexp-based setup for parsing -- Not ideal! I'd really like to use an existing parser, but I need to get access to the parse-tree *with* character offets, rather than just html output, as I'm adding attributes to the string so it renders in a wyswig-esque manner, rather than actually transforming it.
I've looked briefly at discount and peg-markdown -- I'd prefer a C-based parser as the app is Objective-C -- but I'm not sure if it's possible to get a detailed parse-tree out of either of them? I thought I'd ask before digging around and hacking up either of them...
More information about the Markdown-Discuss