[Doc-SIG] verse construct (was Re: [Docutils-develop] Parsing oddness)

David Goodger goodger@users.sourceforge.net
Tue, 07 May 2002 13:29:38 -0400


[moving to Doc-SIG for greater exposure]

David Goodger wrote:
>> However, a literal block isn't really the ideal way to represent an
>> address block, is it?  I've been mulling over an idea for a "verse"
>> directive which seems to apply here.  See
>> http://docutils.sf.net/spec/notes.html#body-verse. What do you
>> think?  How about that ';;' syntax?

Tony J Ibbs (Tibs) wrote:
> As you say, the outstanding question is interpretation of inline markup
> within a verse - i.e., in HTML terms, is it <pre> or not...

Literal blocks use <pre> exclusively and treat all whitespace and line
breaks as significant; no inline markup is recognized.  In "verse blocks"
(semi-literal blocks; anybody have a better name?) only line breaks and
indentation are treated differently from a regular paragraph; inline markup
like *emphasis* is recognized normally.

> Thinking *about* verses, I'd obviously argue for allowing inline markup,
> but am unfussed about lists

I don't think lists or anything else are necessary.  Verse blocks can be
thought of as variations of paragraphs, which don't have nested constructs
in the Docutils model.

> I'm not *too* keen on the use of ";;", but it does have a clear analogy
> with "::", and it's unlikely to be used "by mistake". I assume the rules
> of how it appears are identical to those for "::"? (i.e., precede with a
> space to suppress a colon in the output?)

Perhaps, although I don't think people will want to end a paragraph with a
semicolon.

-- 
David Goodger  <goodger@users.sourceforge.net>  Open-source projects:
  - Python Docutils: http://docutils.sourceforge.net/
    (includes reStructuredText: http://docutils.sf.net/rst.html)
  - The Go Tools Project: http://gotools.sourceforge.net/