Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r69437 - in branches/quickbook-filenames/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2011-03-01 04:14:29


Author: danieljames
Date: 2011-03-01 04:14:28 EST (Tue, 01 Mar 2011)
New Revision: 69437
URL: http://svn.boost.org/trac/boost/changeset/69437

Log:
Better anchor support for lists.
Text files modified:
   branches/quickbook-filenames/tools/quickbook/src/actions.cpp | 2 +-
   branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp | 5 ++++-
   branches/quickbook-filenames/tools/quickbook/test/anchor.gold | 37 +++++++++++++++++++++++++++++++++++++
   branches/quickbook-filenames/tools/quickbook/test/anchor.quickbook | 14 ++++++++++++++
   4 files changed, 56 insertions(+), 2 deletions(-)

Modified: branches/quickbook-filenames/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/actions.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/actions.cpp 2011-03-01 04:14:28 EST (Tue, 01 Mar 2011)
@@ -376,7 +376,7 @@
 
     void list_action(quickbook::actions& actions, value list)
     {
- if(actions.suppress) return;
+ if(!actions.output_pre(actions.out)) return;
 
         typedef std::pair<char, int> mark_type;
         std::stack<mark_type> list_marks;

Modified: branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp (original)
+++ branches/quickbook-filenames/tools/quickbook/src/main_grammar.cpp 2011-03-01 04:14:28 EST (Tue, 01 Mar 2011)
@@ -209,7 +209,9 @@
         local.list =
                 cl::eps_p(cl::ch_p('*') | '#')
                                             [actions.values.reset()]
- >> actions.values.list(block_tags::list)
+ >> actions.scoped_output()
+ [
+ actions.values.list(block_tags::list)
                 [ +actions.values.list()
                     [ (*cl::blank_p) [actions.values.entry(ph::arg1, ph::arg2, general_tags::list_indent)]
>> (cl::ch_p('*') | '#')
@@ -217,6 +219,7 @@
>> *cl::blank_p
>> local.list_item [actions.phrase_value]
                     ]
+ ]
                 ] [actions.element]
             ;
 

Modified: branches/quickbook-filenames/tools/quickbook/test/anchor.gold
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/test/anchor.gold (original)
+++ branches/quickbook-filenames/tools/quickbook/test/anchor.gold 2011-03-01 04:14:28 EST (Tue, 01 Mar 2011)
@@ -43,4 +43,41 @@
   <section id="anchor_test.conditional_section_anchor">
     <anchor id="a12"/> <title>Conditional Section Anchor</title>
   </section>
+ <section id="anchor_test.lists">
+ <title>Lists</title> <anchor id="a14"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 2
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested List <anchor id="a15"/>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ Nested Item 1
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Nested Item 2
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ Item 3
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ </section>
 </article>

Modified: branches/quickbook-filenames/tools/quickbook/test/anchor.quickbook
==============================================================================
--- branches/quickbook-filenames/tools/quickbook/test/anchor.quickbook (original)
+++ branches/quickbook-filenames/tools/quickbook/test/anchor.quickbook 2011-03-01 04:14:28 EST (Tue, 01 Mar 2011)
@@ -33,4 +33,18 @@
 
 [#a12][?__not_defined__ #a13]
 [section Conditional Section Anchor]
+[endsect]
+
+[section Lists]
+
+[#a14]
+
+* Item 1
+* Item 2
+* Nested List
+ [#a15]
+ * Nested Item 1
+ * Nested Item 2
+* Item 3
+
 [endsect]
\ No newline at end of file


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