opening it up with Common Lisp
Book review: Darwinia
Summer reading: Spin
the Omnivoire's Delimma
the Golem's Eye
I received two e-mails asking about CL-Markdown's status over the weekend. Aside from the Interactive Markdown Dingus (live site), I haven't done anything Markdown related since January. It's one of the many projects I want to finish but can't always find much time on which to work...
That said, I brushed off the code on Monday and tried to remember what my plans had been. I known that I started by looking at the Perl and Python sources but soon decided that it all seemed easier that that (famous last words, I know). I went with the following plan:
The first two steps of this went quite well (though there is the added complication of stripping off the starts of lines depending on the current context. I.e., If we in a blockquote already, then we to pull off the initial '>'). The last step turned out to be surprisingly hard for me to quite grok and was the main reason development came to a halt in January.
Things still seemed harder than they should have -- I must not quite understand the problem! -- this time around, but after some thrashing, I developed the function I wanted and much is mostly well. I'm still not sure if my original theory (start and list and create the tree later was flawed or if I'm just being stupid about the list to tree conversion... Sometimes it's hard to tell.)
There are still a few features completely unimplemented (e.g., special character escaping) and lots and lots of glitches. I wrote a program that compares the output of regular markdown and CL-Markdown using John Wiseman's CL-HTML-Diff. I'll get some good and bad examples up later tonight.
I'll also be throwing the code up to Common-Lisp.net in the near future so that everyone can find ways to break it!
Copyright -- Gary Warren King, 2004 - 2006