|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r70206 - in trunk/tools/quickbook: . doc src test
From: dnljms_at_[hidden]
Date: 2011-03-19 15:18:53
Author: danieljames
Date: 2011-03-19 15:18:51 EDT (Sat, 19 Mar 2011)
New Revision: 70206
URL: http://svn.boost.org/trac/boost/changeset/70206
Log:
Quickbook: better anchor placement for lists.
Properties modified:
trunk/tools/quickbook/ (props changed)
Text files modified:
trunk/tools/quickbook/doc/quickbook.qbk | 1 +
trunk/tools/quickbook/src/actions.cpp | 2 +-
trunk/tools/quickbook/src/main_grammar.cpp | 5 ++++-
trunk/tools/quickbook/test/anchor.gold | 37 +++++++++++++++++++++++++++++++++++++
trunk/tools/quickbook/test/anchor.quickbook | 14 ++++++++++++++
5 files changed, 57 insertions(+), 2 deletions(-)
Modified: trunk/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- trunk/tools/quickbook/doc/quickbook.qbk (original)
+++ trunk/tools/quickbook/doc/quickbook.qbk 2011-03-19 15:18:51 EDT (Sat, 19 Mar 2011)
@@ -282,6 +282,7 @@
* Fix delimeter checking for simple markup.
* Allow more block elements to be nested.
* Go back to using invalid markup for lists. It generates better html.
+* Better anchor placement for lists.
* Quickbook 1.6:
* Scope source mode changes to the file they're made in.
Modified: trunk/tools/quickbook/src/actions.cpp
==============================================================================
--- trunk/tools/quickbook/src/actions.cpp (original)
+++ trunk/tools/quickbook/src/actions.cpp 2011-03-19 15:18:51 EDT (Sat, 19 Mar 2011)
@@ -377,7 +377,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: trunk/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/main_grammar.cpp (original)
+++ trunk/tools/quickbook/src/main_grammar.cpp 2011-03-19 15:18:51 EDT (Sat, 19 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: trunk/tools/quickbook/test/anchor.gold
==============================================================================
--- trunk/tools/quickbook/test/anchor.gold (original)
+++ trunk/tools/quickbook/test/anchor.gold 2011-03-19 15:18:51 EDT (Sat, 19 Mar 2011)
@@ -43,4 +43,41 @@
<section id="anchor_test.conditional_section_anchor">
<title><anchor id="a12"/> 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: trunk/tools/quickbook/test/anchor.quickbook
==============================================================================
--- trunk/tools/quickbook/test/anchor.quickbook (original)
+++ trunk/tools/quickbook/test/anchor.quickbook 2011-03-19 15:18:51 EDT (Sat, 19 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