John Maddock wrote:
Okidoki... It's not really the [endsect] in question here. It is
the paragraph; and it's documented.  Paragraphs start left-flushed
and are terminated by two or more newlines. So, if an [endsect]
ends a paragraph as in (indented for clarity):

    blah blah blah
    [endsect]

The literal [endsect] becomes part of the paragraph.

The grammar for paragraph goes somewhat like this:

    paragraph = +line >> +eol;

where each line is ended by a single eol, hence the paragraph
ends with 2 or more eols. It was my thinking that, in the
absence of explicit markup, this is a reasonable behavior.
For example (indented for clarity):

    this is a paragraph X
    this is part of the same paragraph X

    this is a different paragraph Y

If this behavior is not intuitive, let me know and I might find
a reasonable workaround (allowing simple block-ends like
[endsect] to terminate a paragraph).


Understood, I figured that out in the end, it's just that if you read the [section] docs in isolation it wasn't obvious. Probably just a case "in too much of a hurry to read the manual fully".

I ran into this one because I had a bunch of one or two line sections (don't ask!), so all the blank lines made the quickbook source quite hard to read, it looked much better as:

[section]
blah blah blah
[endsect]

[section]
my oh my
[endsect]

but of course that didn't work.

After giving it some thought. I figure the grammar needs to be
changed to allow that. Quickbook is meant to follow the author's
intuition as much as possible, and anything that will require
one to have to read the manual is suspect. Fortunately it is
easy to tweak the code by merely allowing certain markups to
end a paragraph. Something like:

    paragraph = +line >> (+eol | some-special-markups);

Ahh the pleasure of having separated syntax/semantics!

(Oh, BTW, did you have a chance to read my other post re: CR/LF?)

Regards,
--
Joel de Guzman
http://www.boost-consulting.com
http://spirit.sf.net



-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Boost-docs mailing list
[email protected]
Unsubscribe and other administrative requests: 
https://lists.sourceforge.net/lists/listinfo/boost-docs

Reply via email to