I've written briefly about Textile here before. I think I've got it to a releasable stage now, though there's still lots to do. The goal is to provide a more complete implementation of Textile than pg's implementation of Markdown. Here's a very beta 0.1 release: <https://gist.github.com/815476> The implementation, right now, can do Textile documents featuring just these basic features: - blocks -- p is the default, can handle classes, styles and langs attached to them but not ids, for now. Extended blocks are supported. - spans -- all of the default ones are supported, except subscript because I realised that the function wasn't being called because its name contains a tilde, which is a special symbol in Arc. Will be fixed later. no span attributes either for now. But it's missing the things listed at the top of the file. (there's no escaping of html chars in the normal text, so you can fall back to plain HTML for everything else.) There's still quite a lot to do, but it's coming along nicely, I think. Some questions for Arc-ers: 1. Is there a better way to do `str-split` than the one I use here? 2. Is it possible to use a callback for a regular expression replacement, like PHP's preg_replace_callback? Or some equivalent of Perl's e mode for regexps? |