4 ms·
I'm the author of a Markdown text (prose) editor[1], and can attest to Jeff's statement that all Markdown's parsers suck. The official perl regex-based implemen
by SeoxyS 14y ago
I'm the author of a Markdown text (prose) editor[1], and can attest to Jeff's statement that all Markdown's parsers suck. The official perl regex-based implementation is a joke. Sundown is great, but only works for cross-compilation to other markup languages; it doesn't work for syntax highlighting, which is what I'm more interested in.
I ended up writing my own in Objective-C. It's not very pretty, and it doesn't use a formal grammar (just a lexer + custom grammar code), but it does the trick. I took a few liberties with the spec: throwing in GitHub-flavored code blocks.
https://gist.github.com/29dabe4b6e762ee221df https://gist.github.com/29dabe4b6e762ee221df
[1]: http://getmacchiato.com/ http://getmacchiato.com/
- naner 14y agoDid you know of Discount[1]? Reddit switched to that from markdown.py a couple years ago. It is written in C and BSD licensed. 1: http://www.pell.portland.or.us/~orc/Code/discount/ http://www.pell.portland.or.us/~orc/Code/discount/
- Evbn 14y agoI fixed a bug in discount-for-Reddit once. It is some of the cryptic C one sees.
- spartango 14y agoYour editor looks pretty nice; super simple with a gentle element of WYSIWYG. Can you not tile the background on the homepage, though? It looks horrendous at high resolutions and I suspect you didn't mean for it to be that way: http://cl.ly/image/341C0s1s0M03 http://cl.ly/image/341C0s1s0M03 (Safari 6.0, OS X 10.8.2)
- SeoxyS 14y agoWoah, how massive is your screen? You're totally right though, it looks awful tiled. I'll have to take care of that. By the way everybody, I'm working on version 2.0 which is just about a million times better than the original. Hit me up if you'd like to get beta builds and a free copy.