Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75613 - in branches/quickbook-dev/tools/quickbook: src test test/include test/snippets
From: dnljms_at_[hidden]
Date: 2011-11-22 18:45:17


Author: danieljames
Date: 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
New Revision: 75613
URL: http://svn.boost.org/trac/boost/changeset/75613

Log:
Quickbook: Don't unindent code blocks in code snippets.

Because code blocks are added in sections, a nested section could be
unindented too far. Code is unindented in the main quickbook actions, so
there's actually no need to do it when extracting code snippets.

But this lead to left over whitespace that would have been stripped. So
change the `start_snippet` and `end_snippet` grammars to swallow up the
line they're on.

I also added a newline before the end of the snippet, this cleaned up
the occasional syntax error.

But due to these changes there is more leading and trailing whitespace
in the generated code blocks, so I just changed the code block grammar
to strip them out. This means there are no newlines at the beginning or
end of code blocks, but that should be fine.
Text files modified:
   branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp | 62 ++++++++++++++++++++++++++++++---------
   branches/quickbook-dev/tools/quickbook/src/main_grammar.cpp | 16 +++++-----
   branches/quickbook-dev/tools/quickbook/test/callouts-1_5.gold | 50 +++++++++-----------------------
   branches/quickbook-dev/tools/quickbook/test/code-1_1.gold | 9 +---
   branches/quickbook-dev/tools/quickbook/test/include/code-import.gold | 13 ++-----
   branches/quickbook-dev/tools/quickbook/test/include/code-include.gold | 3 -
   branches/quickbook-dev/tools/quickbook/test/quickbook_manual-1_4.gold | 12 ++-----
   branches/quickbook-dev/tools/quickbook/test/snippets/pass_thru.gold | 10 +----
   8 files changed, 85 insertions(+), 90 deletions(-)

Modified: branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp
==============================================================================
--- branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp (original)
+++ branches/quickbook-dev/tools/quickbook/src/code_snippet.cpp 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -123,12 +123,19 @@
                     ;
 
                 start_snippet =
- "#[" >> *cl::space_p
- >> identifier [cl::assign_a(actions.id)]
+ *cl::blank_p
+ >> !(cl::eol_p >> *cl::blank_p)
+ >> "#["
+ >> *cl::blank_p
+ >> identifier [cl::assign_a(actions.id)]
+ >> *(cl::anychar_p - cl::eol_p)
                     ;
 
                 end_snippet =
- cl::str_p("#]")
+ *cl::blank_p
+ >> !(cl::eol_p >> *cl::blank_p)
+ >> "#]"
+ >> *(cl::anychar_p - cl::eol_p)
                     ;
 
                 ignore
@@ -222,16 +229,45 @@
                     ;
 
                 start_snippet =
- "//[" >> *cl::space_p
- >> identifier [cl::assign_a(actions.id)]
+ *cl::blank_p
+ >> !(cl::eol_p >> *cl::blank_p)
+ >> "//["
+ >> *cl::blank_p
+ >> identifier [cl::assign_a(actions.id)]
+ >> *(cl::anychar_p - cl::eol_p)
+ |
+ *cl::blank_p
+ >> cl::eol_p
+ >> *cl::blank_p
+ >> "/*["
+ >> *cl::space_p
+ >> identifier [cl::assign_a(actions.id)]
+ >> *cl::space_p
+ >> "*/"
+ >> *cl::blank_p
+ >> cl::eps_p(cl::eol_p)
                     |
- "/*[" >> *cl::space_p
- >> identifier [cl::assign_a(actions.id)]
- >> *cl::space_p >> "*/"
+ "/*["
+ >> *cl::space_p
+ >> identifier [cl::assign_a(actions.id)]
+ >> *cl::space_p
+ >> "*/"
                     ;
 
                 end_snippet =
- cl::str_p("//]") | "/*]*/"
+ *cl::blank_p
+ >> !(cl::eol_p >> *cl::blank_p)
+ >> "//]"
+ >> *(cl::anychar_p - cl::eol_p)
+ |
+ *cl::blank_p
+ >> cl::eol_p
+ >> *cl::blank_p
+ >> "/*]*/"
+ >> *cl::blank_p
+ >> cl::eps_p(cl::eol_p)
+ |
+ "/*[*/"
                     ;
 
                 inline_callout
@@ -345,8 +381,6 @@
     
         if (!code.empty())
         {
- detail::unindent(code); // remove all indents
-
             if(snippet.content.empty())
             {
                 snippet.start_code = true;
@@ -357,7 +391,7 @@
                 snippet.content += source_type;
                 snippet.content += "```\n";
             }
-
+
             snippet.content += code;
             snippet.end_code = true;
 
@@ -372,7 +406,7 @@
     
         if(snippet.end_code)
         {
- snippet.content += "```\n\n";
+ snippet.content += "\n```\n\n";
             snippet.end_code = false;
         }
     }
@@ -449,7 +483,7 @@
         }
         body += snippet->content;
         if(snippet->end_code) {
- body += "```\n\n";
+ body += "\n```\n\n";
         }
 
         std::vector<std::string> params;

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:45:16 EST (Tue, 22 Nov 2011)
@@ -551,20 +551,20 @@
 
         local.code_block =
                 (
- "```" >>
+ "```" >> *(*cl::blank_p >> cl::eol_p) >>
                     (
- *(cl::anychar_p - (*cl::blank_p >> "```"))
- >> cl::eps_p(*cl::blank_p >> "```")
+ *(cl::anychar_p - (*cl::space_p >> "```"))
+ >> cl::eps_p(*cl::space_p >> "```")
                     ) [actions.code_block]
- >> *cl::blank_p >> "```"
+ >> *cl::space_p >> "```"
                 )
             | (
- "``" >>
+ "``" >> *(*cl::blank_p >> cl::eol_p) >>
                     (
- *(cl::anychar_p - (*cl::blank_p >> "``"))
- >> cl::eps_p(*cl::blank_p >> "``")
+ *(cl::anychar_p - (*cl::space_p >> "``"))
+ >> cl::eps_p(*cl::space_p >> "``")
                     ) [actions.code_block]
- >> *cl::blank_p >> "``"
+ >> *cl::space_p >> "``"
                 )
             ;
 

Modified: branches/quickbook-dev/tools/quickbook/test/callouts-1_5.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/callouts-1_5.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/callouts-1_5.gold 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -12,9 +12,7 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c0" linkends="callout_tests.c1" />
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c0" id="callout_tests.c1">
@@ -29,9 +27,7 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c2" linkends="callout_tests.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c2" id="callout_tests.c3">
@@ -48,9 +44,7 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c4" linkends="callout_tests.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c4" id="callout_tests.c5">
@@ -67,9 +61,7 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c6" linkends="callout_tests.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c6" id="callout_tests.c7">
@@ -86,10 +78,8 @@
   <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.c8" linkends="callout_tests.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
-<phrase role="special">}</phrase>
-
-</programlisting>
+ <co id="callout_tests.c10" linkends="callout_tests.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c12" linkends="callout_tests.c13" />
+<phrase role="special">}</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c8" id="callout_tests.c9">
@@ -109,8 +99,7 @@
     </callout>
   </calloutlist>
   <para>
-<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" />
-</programlisting>
+<programlisting><co id="callout_tests.c14" linkends="callout_tests.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.c16" linkends="callout_tests.c17" /></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="callout_tests.c14" id="callout_tests.c15">
@@ -135,9 +124,7 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c0" linkends="callout_tests.test_section.c1" />
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c0" id="callout_tests.test_section.c1">
@@ -152,9 +139,7 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c2" linkends="callout_tests.test_section.c3" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c2" id="callout_tests.test_section.c3">
@@ -171,9 +156,7 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c4" linkends="callout_tests.test_section.c5" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c4" id="callout_tests.test_section.c5">
@@ -190,9 +173,7 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c6" linkends="callout_tests.test_section.c7" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c6" id="callout_tests.test_section.c7">
@@ -209,10 +190,8 @@
     <para>
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
   <co id="callout_tests.test_section.c8" linkends="callout_tests.test_section.c9" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special">&lt;</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&amp;,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="special">&gt;</phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
-<co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
-<phrase role="special">}</phrase>
-
-</programlisting>
+ <co id="callout_tests.test_section.c10" linkends="callout_tests.test_section.c11" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c12" linkends="callout_tests.test_section.c13" />
+<phrase role="special">}</phrase></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c8" id="callout_tests.test_section.c9">
@@ -232,8 +211,7 @@
       </callout>
     </calloutlist>
     <para>
-<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" />
-</programlisting>
+<programlisting><co id="callout_tests.test_section.c14" linkends="callout_tests.test_section.c15" /><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special">&lt;&gt;</phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <co id="callout_tests.test_section.c16" linkends="callout_tests.test_section.c17" /></programlisting>
     </para>
     <calloutlist>
       <callout arearefs="callout_tests.test_section.c14" id="callout_tests.test_section.c15">

Modified: branches/quickbook-dev/tools/quickbook/test/code-1_1.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/code-1_1.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/code-1_1.gold 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -28,15 +28,13 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
     </para>
   </section>
   <section id="code_block.test_3">
     <title>Test 3</title>
     <para>
-<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase>
-</programlisting>
+<programlisting><phrase role="keyword">print</phrase> <phrase role="string">&quot;\xfabln\xeck&quot;</phrase></programlisting>
     </para>
   </section>
   <section id="code_block.test_4">
@@ -45,8 +43,7 @@
       This isn't valid C++ but I think we should accept it;
     </para>
     <para>
-<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase>
-</programlisting>
+<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\xfabln\xeck&quot;</phrase><phrase role="special">&lt;&lt;</phrase><phrase role="string">&quot;\n&quot;</phrase><phrase role="special">;</phrase></programlisting>
     </para>
   </section>
 </article>

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-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -28,8 +28,7 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <para>
     This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
@@ -56,9 +55,7 @@
   <para>
 <programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
     <phrase role="comment"># return 'em, foo man!</phrase>
- <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase>
-
-</programlisting>
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase></programlisting>
   </para>
   <para>
     This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
@@ -86,8 +83,7 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <para>
 <programlisting><phrase role="keyword">class</phrase> <phrase role="identifier">x</phrase>
@@ -111,8 +107,7 @@
     <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>
+<phrase role="special">};</phrase></programlisting>
   </para>
   <calloutlist>
     <callout arearefs="import.c0" id="import.c1">

Modified: branches/quickbook-dev/tools/quickbook/test/include/code-include.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/include/code-include.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/include/code-include.gold 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -31,8 +31,7 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <para>
     This should appear when <literal>stub.py</literal> is included.

Modified: branches/quickbook-dev/tools/quickbook/test/quickbook_manual-1_4.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/quickbook_manual-1_4.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/quickbook_manual-1_4.gold 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -733,8 +733,7 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
         </para>
       </section>
       <section id="quickbook.syntax.phrase.source_mode">
@@ -2465,8 +2464,7 @@
 <phrase role="special">{</phrase>
     <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="string">&quot;Hello, World!&quot;</phrase> <phrase role="special">&lt;&lt;</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
     <phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
                   </para>
                 </entry>
               </row>
@@ -2627,8 +2625,7 @@
 <phrase role="special">{</phrase>
     <phrase role="comment">// return 'em, foo man!</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo&quot;</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
         </para>
         <para>
           This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
@@ -2701,8 +2698,7 @@
 <programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <co id="quickbook.syntax.block.import.c0" linkends="quickbook.syntax.block.import.c1" />
 <phrase role="special">{</phrase>
     <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <co id="quickbook.syntax.block.import.c2" linkends="quickbook.syntax.block.import.c3" />
-<phrase role="special">}</phrase>
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
         </para>
         <calloutlist>
           <callout arearefs="quickbook.syntax.block.import.c0" id="quickbook.syntax.block.import.c1">

Modified: branches/quickbook-dev/tools/quickbook/test/snippets/pass_thru.gold
==============================================================================
--- branches/quickbook-dev/tools/quickbook/test/snippets/pass_thru.gold (original)
+++ branches/quickbook-dev/tools/quickbook/test/snippets/pass_thru.gold 2011-11-22 18:45:16 EST (Tue, 22 Nov 2011)
@@ -10,8 +10,7 @@
     Use, modification and distribution is subject to the Boost Software
     License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
     http://www.boost.org/LICENSE_1_0.txt)
-=============================================================================*/</phrase>
-</programlisting>
+=============================================================================*/</phrase></programlisting>
   </para>
   <para>
 <programlisting><phrase role="keyword">struct</phrase> <phrase role="identifier">Foo</phrase><phrase role="special">{</phrase>
@@ -24,13 +23,10 @@
 <phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
 <phrase role="special">{</phrase>
     <phrase role="identifier">Foo</phrase> <phrase role="identifier">x</phrase><phrase role="special">;</phrase>
-<phrase role="special">}</phrase>
-
-</programlisting>
+<phrase role="special">}</phrase></programlisting>
   </para>
   <para>
 <programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">:</phrase>
- <phrase role="keyword">print</phrase><phrase role="special">(</phrase><phrase role="string">'foo'</phrase><phrase role="special">)</phrase>
-</programlisting>
+ <phrase role="keyword">print</phrase><phrase role="special">(</phrase><phrase role="string">'foo'</phrase><phrase role="special">)</phrase></programlisting>
   </para>
 </article>


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