From: Blake W. <bw...@la...> - 2008-02-05 12:59:24
|
Waylan Limberg wrote: > [1]: http://code.google.com/p/monk-wiki/ > [2]: http://sourceforge.net/mailarchive/forum.php?forum_name=python-markdown-discuss I'll check these out (and the link that Herbert suggested). >> Oh, and do you handle definition lists? The examples I saw were all of >> the form: >> definition term >> : definition description >> If you don't handle them, how hard do you think it would be to create a >> plugin that would handle them? > > Unfortunately, that's the one thing I haven't tried to tackle yet. I > find the whole 'description gets the markup (:), not the term' a > little hard to wrap my mind around. I keep getting the feeling that > we'll need to make some changes to the core to get that one to work, > although I could be wrong. If you have any suggestions, I'm game. It seems to me, (after a total of 5 minutes of thinking about it ;) that you could use a combination of pre- and post-processors. The pre-processor would turn a line that preceeds a line that starts with a colon (should be easy enough to find, just get lines[index-1]) into something more recognizable for the parser, and the post processor could turn those things into dt/dd sets. Actually, I think you could just turn them into lines of the form "<dt>...</dt>" and "<dd>...</dd>". Thanks, Blake. |