Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75224 - in branches/quickbook-dev/tools/quickbook: src test/include
From: dnljms_at_[hidden]
Date: 2011-11-01 15:00:22


Author: danieljames
Date: 2011-11-01 15:00:21 EDT (Tue, 01 Nov 2011)
New Revision: 75224
URL: http://svn.boost.org/trac/boost/changeset/75224

Log:
Quickbook: Trim trailing whitespace in code blocks.
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/post_process.cpp | 2 +
   branches/quickbook-dev/tools/quickbook/test/include/code-import.gold | 47 ++++++++++++++++++++++++++++++++++++++++
   branches/quickbook-dev/tools/quickbook/test/include/code-import.quickbook | 1
   3 files changed, 50 insertions(+), 0 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/post_process.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/post_process.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/post_process.cpp 2011-11-01 15:00:21 EDT (Tue, 01 Nov 2011)
@@ -352,6 +352,7 @@
             {
                 if (*i == '\n')
                 {
+ state.printer_.trim_spaces();
                     state.out += '\n';
                     ++i;
                     if (i != l && *i != '\r')
@@ -359,6 +360,7 @@
                 }
                 else if (*i == '\r')
                 {
+ state.printer_.trim_spaces();
                     state.out += '\n';
                     ++i;
                     if (i != l && *i != '\n')

Modified: branches/quickbook-dev/tools/quickbook/test/include/code-import.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/include/code-import.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/include/code-import.gold 2011-11-01 15:00:21 EDT (Tue, 01 Nov 2011)
@@ -89,4 +89,51 @@
 <phrase role="special">}</phrase>
 </programlisting>
   </para>
+ <para>
+<programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
+<phrase role="special">{</phrase>
+<phrase role="keyword">public</phrase><phrase role="special">:</phrase>
+
+ <co id="import.c0" linkends="import.c1" /><phrase role="identifier">x</phrase><phrase role="special">()</phrase> <phrase role="special">:</phrase> <phrase role="identifier">n</phrase><phrase role="special">(</phrase><phrase role="number">0</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c2" linkends="import.c3" /><phrase role="special">~</phrase><phrase role="identifier">x</phrase><phrase role="special">()</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c4" linkends="import.c5" /><phrase role="keyword">int</phrase> <phrase role="identifier">get</phrase><phrase role="special">()</phrase> <phrase role="keyword">const</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="keyword">return</phrase> <phrase role="identifier">n</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+
+ <co id="import.c6" linkends="import.c7" /><phrase role="keyword">void</phrase> <phrase role="identifier">set</phrase><phrase role="special">(</phrase><phrase role="keyword">int</phrase> <phrase role="identifier">n_</phrase><phrase role="special">)</phrase>
+ <phrase role="special">{</phrase>
+ <phrase role="identifier">n</phrase> <phrase role="special">=</phrase> <phrase role="identifier">n_</phrase><phrase role="special">;</phrase>
+ <phrase role="special">}</phrase>
+<phrase role="special">};</phrase>
+</programlisting>
+ </para>
+ <calloutlist>
+ <callout arearefs="import.c0" id="import.c1">
+ <para>
+ Constructor
+ </para>
+ </callout>
+ <callout arearefs="import.c2" id="import.c3">
+ <para>
+ Destructor
+ </para>
+ </callout>
+ <callout arearefs="import.c4" id="import.c5">
+ <para>
+ Get the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ <callout arearefs="import.c6" id="import.c7">
+ <para>
+ Set the <code><phrase role="identifier">n</phrase></code> member variable
+ </para>
+ </callout>
+ </calloutlist>
 </article>

Modified: branches/quickbook-dev/tools/quickbook/test/include/code-import.quickbook
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/include/code-import.quickbook (original)
+++ branches/quickbook-dev/tools/quickbook/test/include/code-import.quickbook 2011-11-01 15:00:21 EDT (Tue, 01 Nov 2011)
@@ -10,3 +10,4 @@
 
 [foo_c]
 
+[class_]
\ 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