Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71055 - in trunk/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-04-06 19:42:10


Author: danieljames
Date: 2011-04-06 19:42:09 EDT (Wed, 06 Apr 2011)
New Revision: 71055
URL: http://svn.boost.org/trac/boost/changeset/71055

Log:
Quickbook: If a phrase template turns out to be a block template, treat it as a complete block.
Text files modified:
   trunk/tools/quickbook/src/actions.cpp | 1 +
   trunk/tools/quickbook/test/templates.gold | 25 +++++++++++++++++++++++--
   trunk/tools/quickbook/test/templates.quickbook | 13 ++++++++-----
   3 files changed, 32 insertions(+), 7 deletions(-)

Modified: trunk/tools/quickbook/src/actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions.cpp (original)
+++ trunk/tools/quickbook/src/actions.cpp 2011-04-06 19:42:09 EDT (Wed, 06 Apr 2011)
@@ -1341,6 +1341,7 @@
             actions.paragraph(); // For paragraphs before the template call.
             actions.out << block;
             actions.phrase << phrase;
+ actions.paragraph();
         }
         else {
             actions.phrase << phrase;

Modified: trunk/tools/quickbook/test/templates.gold
==============================================================================
--- trunk/tools/quickbook/test/templates.gold (original)
+++ trunk/tools/quickbook/test/templates.gold 2011-04-06 19:42:09 EDT (Wed, 06 Apr 2011)
@@ -67,6 +67,9 @@
   <section id="templates.nested_templates">
     <title><link linkend="templates.nested_templates">Nested Templates</link></title>
     <para>
+ Pre
+ </para>
+ <para>
       Start block template.
     </para>
     <para>
@@ -82,6 +85,12 @@
       End block template.
     </para>
     <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
       Start block template.
     </para>
     <para>
@@ -91,6 +100,12 @@
       End block template.
     </para>
     <para>
+ Post
+ </para>
+ <para>
+ Pre
+ </para>
+ <para>
       Start phrase template.
     </para>
     <para>
@@ -103,8 +118,14 @@
       End block template.
     </para>
     <para>
- End phrase template. Start phrase template. Start phrase template. Hello! End
- phrase template. End phrase template.
+ End phrase template.
+ </para>
+ <para>
+ Post
+ </para>
+ <para>
+ Pre Start phrase template. Start phrase template. Hello! End phrase template.
+ End phrase template. Post
     </para>
   </section>
 </article>

Modified: trunk/tools/quickbook/test/templates.quickbook
==============================================================================
--- trunk/tools/quickbook/test/templates.quickbook (original)
+++ trunk/tools/quickbook/test/templates.quickbook 2011-04-06 19:42:09 EDT (Wed, 06 Apr 2011)
@@ -160,9 +160,12 @@
 
 [template phrase[content] Start phrase template. [content] End phrase template.]
 
-[block [block Hello!]]
-[block [phrase Hello!]]
-[phrase [block Hello!]]
-[phrase [phrase Hello!]]
+Pre [block [block Hello!]] Post
 
-[endsect]
\ No newline at end of file
+Pre [block [phrase Hello!]] Post
+
+Pre [phrase [block Hello!]] Post
+
+Pre [phrase [phrase Hello!]] Post
+
+[endsect]


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