[Doc-SIG] Block quotes

David Goodger goodger@users.sourceforge.net
Sun, 11 Nov 2001 18:29:35 -0500


Alan Jaffray wrote:
> What if any section of text
> 
> 1) where every line starts with the same prefix, either ">" or "> "
> 2) with blank lines after it
> 3) with either blank lines, or a line ending with a colon, before it
> 
> were treated as a block quote?

I think an "email Reader" is appropriate, to establish context. Your rules
handle one construct found in email messages. But there's another one, just
as important: RFC822 headers. They are ambiguous without a known email
context. Also, there are signatures, usually (but not always) preceded by
"-- " on a line by itself.

I can't point to examples, since none exist yet. Once there's an official
Reader or two in the project, it will be a lot easier to make new ones. A
"standalone document Reader" is on my to-do list, but I haven't gotten
around to it yet. Go ahead & write some code if you're keen.

> This "does the right thing" with most common email quoting, and I'm having
> trouble thinking of an example where it would result in ambiguity.

Doctest blocks? ::

    >>> print ">>> hello"
    >>> hello

Contrived, yes, but possible.

-- 
David Goodger    goodger@users.sourceforge.net    Open-source projects:
 - Python Docstring Processing System: http://docstring.sourceforge.net
 - reStructuredText: http://structuredtext.sourceforge.net
 - The Go Tools Project: http://gotools.sourceforge.net