[Doc-SIG] reStructuredText: Revised Structured Text Specification

Tony J Ibbs (Tibs) tony@lsl.co.uk
Mon, 27 Nov 2000 10:43:14 -0000


I've still to read David's mammoth work (it's headed to the printer so I
can look at it later). So a minor comment on something I *can* comment
on quickly:

Lists without blank lines between them::

  a. A line
  b. Another line
     ii. Something else
  c. And more

is something that the Zope STNG would like to address, and it is also
something that is relatively easy to do, either in the STNG code that is
being worked on, or in the "quick hack" that I've been working on, or
(definitely!) in whatever David works on (one assumes).

(one can either move some of the "recognition" code from the colouriser
into the paragrapher, or else enable the colourised to split existing
paragraphs - it's a matter of taste)

Maybe that's not what Bob was talking about, since he mentions ST
producing::

  <OL>
  <LI><P>one</P>
  <LI><P>two</P>
  <LI><P>three</P>
  </OL>

which I'd regard as "broken" HTML anyway, so I doubt *anyone's* STNG
would/should produce it...

(and I suspect it's much more likely to start that with '<ol type="1">',
or whatever the syntax is, anyway)

As to coding - Zope people are working on it now. I've got a "test bed"
using RE's that I'm working on in my glacial slow time - it's only
partial, but it shows parsing with some more of what is wanted than
STClassic provides. I'd prefer to use mxTextTools to REs, but REs are in
Python now...

I think that coding is not a large problem - we can steal stuff from
various places, and the bulk of "given a docstring produce a structure
you can use to emit interesting stuff" is quick to write.

But I'd better stop now - I've got paid work to do, and then some
reading...

<<interrupts self, reading the next message in line>>

Both Zope/STNG and what I was hacking assume a code that one subclases
from. Indeed, one can affect the parsing done even without a new
subclass.

Adding recognition of paragraphs that start with ">>>" (which is *all*
one needs to do if paragraphs are delimited by blank lines, of course)
is trivial and copes with Tim Peters' neat doc test tool, as said. I'd
refrain from worrying about email messages yet!

(but, as I believe I said before, the people at Zope aren't entirely
silly, you know - I suspect they've seen the possibilities as well!)

Tibs

--
Tony J Ibbs (Tibs)      http://www.tibsnjoan.co.uk/
"How fleeting are all human passions compared with the massive
continuity of ducks." - Dorothy L. Sayers, "Gaudy Night"
My views! Mine! Mine! (Unless Laser-Scan ask nicely to borrow them.)