reST Wiki mode, was [Doc-SIG] Suggestions for reST "modes"

Garth T Kidd
Thu, 9 Aug 2001 08:59:54 +1000

My bad:

> A short-cut: if the directive identifier maps to a string, the parser
> parses the contents and inserts an element with the string as the
> element name. If the directive identifier maps to None, use the
> directive identifier as the element name. I can see that
> being handy for people.

Unfortunately, it means that a reStructuredText environment *without*
those directive specifications loaded wouldn't be able to spit out valid
reStructuredText given the node tree or XML.

I'm not sure how much of a problem that is, but it bears considering.

I suspect I'm currently leaning in the direction of parser-loaded
directives having the ability to "hook" the parser to alter the way it
interprets the input [examples]_, but not affecting the composition of
the parser output in such a way that would make it impossible for an
`OOB` reST engine to reverse-engineer from the XML or node tree some
valid reST input that would create the same output.

.. _[examples] For example, automatically wrapping Python identifiers
   in literals or implementing "lazy" paragraph identation rules for
   people with crummy editors.

.. _OOB: Out of the box, ie without any directives loaded. Now, how on
   Earth do we render this link target, or any other non-URI link target
   that hasn't been rescued by some directive? I'm using it as a
   footnote. Hmmm.