Subject: Wiki (Textile) parses any XML element starting with "pre" as pre tag.
On the wiki, whenever I need to wrap a code sample in a "pre" tag and that code sample then includes an XML element starting with "pre", the wiki textile parser parses this as another "pre" tag. For instance, I have a bunch of XML documents including "prescription" elements and the only way to get formatting right is to replace "prescription" with an accented "prêscription", which is becoming a bit of a hassle.
Any idea on how to fix this?
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Tekkub on 03 Jul, 2009 12:45 AM
Can you give me an example block of code that doesn't work? I thought I'd fixed this issue, this renders correctly on my wiki:
3 Posted by Sebastian Friedrich on 03 Jul, 2009 12:59 AM
It seems it breaks if there are nested tags starting with pre as in this example:
4 Posted by Sebastian Friedrich on 03 Jul, 2009 01:03 AM
Let's see if I can get the source displayed or if that breaks also:
Support Staff 5 Posted by Tekkub on 03 Jul, 2009 01:12 AM
Ah Tender... luckily the email is plaintext.
6 Posted by Sebastian Friedrich on 03 Aug, 2009 11:19 PM
Any updates on this?
Support Staff 7 Posted by Tekkub on 11 Aug, 2009 09:08 AM
No updates at the moment, I've been fighting with the regexp to little success, it seems matching up tags in a regexp is not a simple matter...
8 Posted by Jakub Narębski on 11 Aug, 2009 03:04 PM
Why regexp and not parsing?
Support Staff 9 Posted by Tekkub on 12 Aug, 2009 01:16 AM
Right now we pull the pre blocks out with a regexp before creating the links to other wiki pages, then we inject the pre blocks back in and run the whole shebang through textile. If you've got a nice way to convert [[page name]] into a proper link while avoiding applying it to pre, code and notextile blocks.... I'm all ears!