|
From: Paul Tremblay <phthenry <at> yahoo.com>
Subject: nested inline tags Newsgroups: gmane.text.docutils.user Date: 2003-05-06 21:56:14 GMT (5 years, 6 days, 3 hours and 34 minutes ago) I know that reStructruedtext doesn't support nested inline tags. What is the reasoning behind this? Is it too difficult to add, or does David think it is just not needed? I have written a script in Sax (with python, of course), that adds the ability to add inline funtionatlity to a reStructured text. It works like this: Example Text ^^^^^^^^^^^^ hello world [:word1 word2: inline text [:word3: more text] yet more text] .. end of document I then run this document through the docutils script; after that, I run the document through my script using sax. The result is: <document socurce = "/home/paul/file"> <title>Example Text</title> <paragraph>hello world</paragraph> <paragraph><inline arg1="word1" arg2="word2"> inline text<inline arg1="word4">more text</inline>Yet more text</inline></paragraph> <comment>end of document</comment> </document> The script tests for ill-formed XML. If the brackets will result in ill-formed XML, it outputs an error message rather than make tags. The script also distinguishes between regular brackets and those used for inline tags ([:text:]) The inability to have nested inline text seemed to be the only limitation of reStructured text. After all, I reasoned that at some point I would need nested inline tags, and there is no way to hack the current situation. If you write a tag (<tag>), it simply gets converted to <tag> (logically!) Also, the `test` construct seemed rather difficult to parse, since this construct doesn't distinguish between what might be part of the tag, and what would be part of the body. By the way, reStructure text is *great* Paul __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com ------------------------------------------------------- Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara The only event dedicated to issues related to Linux enterprise solutions www.enterpriselinuxforum.com |
|
|