I see someone else is trying to make a Python port of the Textile 2 syntax. My approach so far has been a straight port of the Perl code by Brad Choate, with some minor tweaks (using
mimetypes, for example), rather than trying to hack Mark’s existing module.
Now that I’ve been hacking away for a week (and am about 700 lines away from being done—I just started on
format_table, which looks downright nasty), I’m becoming convinced that the smarter plan would have been to write a lexer from scratch for the Textile markup, rather than trying to use the regex-happy approach Choate used (which works far, far better in Perl than in Python).