$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
From: joel_at_[hidden]
Date: 2007-08-01 19:46:51
Author: djowel
Date: 2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
New Revision: 38347
URL: http://svn.boost.org/trac/boost/changeset/38347
Log:
code import bug fix: inhibit generation of empty code snips.
Text files modified: 
   trunk/tools/quickbook/detail/actions.cpp                          |    21 +++++++++++++++------                   
   trunk/tools/quickbook/detail/actions_class.cpp                    |     2 ++                                      
   trunk/tools/quickbook/detail/utils.cpp                            |     3 +++                                     
   trunk/tools/quickbook/doc/html/index.html                         |     2 +-                                      
   trunk/tools/quickbook/doc/html/quickbook/editors/kde_support.html |     6 +++---                                  
   trunk/tools/quickbook/doc/html/quickbook/faq.html                 |     2 +-                                      
   trunk/tools/quickbook/doc/html/quickbook/ref.html                 |     2 +-                                      
   trunk/tools/quickbook/doc/html/quickbook/syntax/block.html        |    13 ++++++-------                           
   trunk/tools/quickbook/test/stub.cpp                               |     3 +++                                     
   9 files changed, 35 insertions(+), 19 deletions(-)
Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp	(original)
+++ trunk/tools/quickbook/detail/actions.cpp	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -437,7 +437,7 @@
                     // Try to break the last argument at the first space found
                     // and push it into the back of template_info. Do this
                     // recursively until we have all the expected number of
-                    // arguments, or if there is no more spaces left.
+                    // arguments, or if there are no more spaces left.
 
                     std::string& str = template_info.back();
                     std::string::size_type l_pos = str.find_first_of(" \t\r\n");
@@ -908,12 +908,18 @@
         if (!code.empty())
         {
             detail::unindent(code); // remove all indents
-            snippet += "\n\n``\n" + code + "``\n\n";
-            code.clear();
+            if (code.size() != 0)
+            {
+                snippet += "\n\n``\n" + code + "``\n\n";
+                code.clear();
+            }
         }
         std::string temp(first, last);
-        detail::unindent(temp); // remove all indents
-        snippet += "\n" + temp; // add a linebreak to allow block marskups
+        if (temp.size() != 0)
+        {
+            detail::unindent(temp); // remove all indents
+            snippet += "\n" + temp; // add a linebreak to allow block marskups
+        }
     }
 
     void cpp_code_snippet_grammar::compile(iterator first, iterator last) const
@@ -922,7 +928,10 @@
         if (!code.empty())
         {
             detail::unindent(code); // remove all indents
-            snippet += "\n\n```\n" + code + "```\n\n";
+            if (code.size() != 0)
+            {
+                snippet += "\n\n```\n" + code + "```\n\n";
+            }
 
             snippet += "'''<calloutlist>'''";
             for (size_t i = 0; i < callouts.size(); ++i)
Modified: trunk/tools/quickbook/detail/actions_class.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions_class.cpp	(original)
+++ trunk/tools/quickbook/detail/actions_class.cpp	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -202,6 +202,7 @@
         out.push();
         phrase.push();
         temp.push();
+        temp_para.push();
         list_buffer.push();
         templates.push();
     }
@@ -222,6 +223,7 @@
         out.pop();
         phrase.pop();
         temp.pop();
+        temp_para.pop();
         list_buffer.pop();
         templates.pop();
     }
Modified: trunk/tools/quickbook/detail/utils.cpp
==============================================================================
--- trunk/tools/quickbook/detail/utils.cpp	(original)
+++ trunk/tools/quickbook/detail/utils.cpp	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -64,6 +64,9 @@
         std::string::size_type const start = program.find_first_not_of("\r\n");
         program.erase(0, start);
 
+        if (program.size() == 0)
+            return; // nothing left to do
+
         // Get the first line indent
         std::string::size_type indent = program.find_first_not_of(" \t");
         std::string::size_type pos = 0;
Modified: trunk/tools/quickbook/doc/html/index.html
==============================================================================
--- trunk/tools/quickbook/doc/html/index.html	(original)
+++ trunk/tools/quickbook/doc/html/index.html	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -70,7 +70,7 @@
 </div>
 </div>
 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
-<td align="left"><p><small>Last revised: July 31, 2007 at 01:38:44 GMT</small></p></td>
+<td align="left"><p><small>Last revised: August 01, 2007 at 23:43:11 GMT</small></p></td>
 <td align="right"><small></small></td>
 </tr></table>
 <hr>
Modified: trunk/tools/quickbook/doc/html/quickbook/editors/kde_support.html
==============================================================================
--- trunk/tools/quickbook/doc/html/quickbook/editors/kde_support.html	(original)
+++ trunk/tools/quickbook/doc/html/quickbook/editors/kde_support.html	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -51,7 +51,7 @@
         <span class="bold"><b>html generated from this .qbk file</b></span>
       </p>
 <div class="table">
-<a name="id466276"></a><p class="title"><b>Table 7. Code examples</b></p>
+<a name="id466275"></a><p class="title"><b>Table 7. Code examples</b></p>
 <table class="table" summary="Code examples">
 <colgroup>
 <col>
@@ -150,7 +150,7 @@
         region can be folded or unfolded independently.
       </p>
 <a name="quickbook.editors.kde_support.auto_comment___uncomment_"></a><h4>
-<a name="id466715"></a>
+<a name="id466714"></a>
         <a href="kde_support.html#quickbook.editors.kde_support.auto_comment___uncomment_">Auto
         Comment / Uncomment </a>
       </h4>
@@ -425,7 +425,7 @@
 </td></tr>
 </table></div>
 <a name="quickbook.editors.kde_support.installing_boost__hs"></a><h4>
-<a name="id467276"></a>
+<a name="id467275"></a>
         <a href="kde_support.html#quickbook.editors.kde_support.installing_boost__hs">Installing
         boost::hs</a>
       </h4>
Modified: trunk/tools/quickbook/doc/html/quickbook/faq.html
==============================================================================
--- trunk/tools/quickbook/doc/html/quickbook/faq.html	(original)
+++ trunk/tools/quickbook/doc/html/quickbook/faq.html	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -26,7 +26,7 @@
 <div class="titlepage"><div><div><h2 class="title" style="clear: both">
 <a name="quickbook.faq"></a> Frequently Asked Questions</h2></div></div></div>
 <a name="quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_"></a><h3>
-<a name="id467432"></a>
+<a name="id467431"></a>
       <a href="faq.html#quickbook.faq.can_i_use_quickbook_for_non_boost_documentation_">Can
       I use QuickBook for non-Boost documentation?</a>
     </h3>
Modified: trunk/tools/quickbook/doc/html/quickbook/ref.html
==============================================================================
--- trunk/tools/quickbook/doc/html/quickbook/ref.html	(original)
+++ trunk/tools/quickbook/doc/html/quickbook/ref.html	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -28,7 +28,7 @@
       [cpp]
     </p>
 <div class="table">
-<a name="id467530"></a><p class="title"><b>Table 8. Syntax Compendium</b></p>
+<a name="id467529"></a><p class="title"><b>Table 8. Syntax Compendium</b></p>
 <table class="table" summary="Syntax Compendium">
 <colgroup>
 <col>
Modified: trunk/tools/quickbook/doc/html/quickbook/syntax/block.html
==============================================================================
--- trunk/tools/quickbook/doc/html/quickbook/syntax/block.html	(original)
+++ trunk/tools/quickbook/doc/html/quickbook/syntax/block.html	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -876,7 +876,7 @@
               </td>
 <td>
               <p>
-                2007-Jul-31
+                2007-Aug-02
               </p>
               </td>
 </tr>
@@ -893,7 +893,7 @@
               </td>
 <td>
               <p>
-                09:38:44 AM
+                07:43:11 AM
               </p>
               </td>
 </tr>
@@ -1711,21 +1711,20 @@
 <span class="special">{</span>
     <span class="comment">// return 'em, bar man!
 </span>    <span class="keyword">return</span> <span class="string">"bar"</span><span class="special">;</span>
-<span class="special">}</span>
-</pre>
+<span class="special">}</span></pre>
 <p>
           </p>
 <p>
           </p>
 <p>
-            </p>
+            Some trailing text here </p>
 <div class="calloutlist"><table border="0" summary="Callout list"></table></div>
 <p>
           </p>
 <p>
         </p>
 <a name="quickbook.syntax.block.import.code_snippet_markup"></a><h5>
-<a name="id462308"></a>
+<a name="id462307"></a>
           <a href="block.html#quickbook.syntax.block.import.code_snippet_markup">Code
           Snippet Markup</a>
         </h5>
@@ -1788,7 +1787,7 @@
           between the delimeters will simply be ignored.
         </p>
 <a name="quickbook.syntax.block.import.callouts"></a><h5>
-<a name="id462582"></a>
+<a name="id462581"></a>
           <a href="block.html#quickbook.syntax.block.import.callouts">Callouts</a>
         </h5>
 <p>
Modified: trunk/tools/quickbook/test/stub.cpp
==============================================================================
--- trunk/tools/quickbook/test/stub.cpp	(original)
+++ trunk/tools/quickbook/test/stub.cpp	2007-08-01 19:46:50 EDT (Wed, 01 Aug 2007)
@@ -15,6 +15,9 @@
     // return 'em, bar man!
     return "bar";
 }
+/*`
+Some trailing text here
+*/
 //]
 
 //[ foo