|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75632 - in branches/quickbook-dev/tools/quickbook: doc src test
From: dnljms_at_[hidden]
Date: 2011-11-22 18:50:49
Author: danieljames
Date: 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
New Revision: 75632
URL: http://svn.boost.org/trac/boost/changeset/75632
Log:
Quickbook: Allow block elements in lists.
Text files modified:
branches/quickbook-dev/tools/quickbook/doc/1_6.qbk | 4 ++--
branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp | 1 +
branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp | 6 ++++--
branches/quickbook-dev/tools/quickbook/test/list_test-1_6.gold | 37 +++++++++++++++++++++++++++++++++++++
branches/quickbook-dev/tools/quickbook/test/list_test-1_6.quickbook | 4 ++++
5 files changed, 48 insertions(+), 4 deletions(-)
Modified: branches/quickbook-dev/tools/quickbook/doc/1_6.qbk
==============================================================================
--- branches/quickbook-dev/tools/quickbook/doc/1_6.qbk (original)
+++ branches/quickbook-dev/tools/quickbook/doc/1_6.qbk 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
@@ -209,7 +209,8 @@
[section:listparagraphs Pargraphs in lists]
-I'm still refining this, but paragraphs can now be used in lists:
+I'm still refining this, but paragraphs and block elements can now be used
+in lists:
[pre
* Para 1
@@ -236,7 +237,6 @@
Para 3
/TODO/: Improve code generation.
-/TODO/: Allow block elements in list items.
[endsect]
Modified: branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/grammar_impl.hpp 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
@@ -36,6 +36,7 @@
in_conditional = in_phrase | conditional_or_block,
in_nested_block = in_conditional | nested_block,
only_block = block | conditional_or_block | nested_block,
+ only_nested_block = conditional_or_block | nested_block,
only_contextual_block = block | conditional_or_block | nested_block | maybe_block
};
Modified: branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
@@ -353,13 +353,15 @@
>> (cl::ch_p('*') | '#')
>> *cl::blank_p [local.list.still_in_block = true]
>> *( cl::eps_p(local.list.still_in_block)
- >> local.list_item
+ >> local.list_item(element_info::only_block)
)
>> cl::eps_p [actions.list_item]
;
local.list_item =
- cl::eps_p(local.paragraph_separator) [local.list.still_in_block = false]
+ local.element(local.list_item.context)
+ >> !eol [local.list.still_in_block = false]
+ | local.paragraph_separator [local.list.still_in_block = false]
| local.common(element_info::in_phrase)
;
Modified: branches/quickbook-dev/tools/quickbook/test/list_test-1_6.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/list_test-1_6.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/list_test-1_6.gold 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
@@ -309,6 +309,43 @@
</footnote>
</simpara>
</listitem>
+ <listitem>
+ <simpara>
+ <informaltable frame="all">
+ <tgroup cols="1">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ Heading
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ Cell
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </informaltable>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ <bridgehead renderas="sect2" id="list_test.h0">
+ <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
+ heading for a list item</link>
+ </bridgehead>
+ <para>
+ The content of the list item.
+ </para>
+ </simpara>
+ </listitem>
</itemizedlist>
<para>
Don't end list with comment 1:
Modified: branches/quickbook-dev/tools/quickbook/test/list_test-1_6.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/list_test-1_6.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/list_test-1_6.quickbook 2011-11-22 18:50:48 EST (Tue, 22 Nov 2011)
@@ -73,6 +73,10 @@
* [*Bold]
* ["Quoted]
* [footnote Footnote]
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
Don't end list with comment 1:
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk