Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62466 - in trunk/tools/quickbook: . detail test
From: daniel_james_at_[hidden]
Date: 2010-06-06 03:21:11


Author: danieljames
Date: 2010-06-06 03:21:10 EDT (Sun, 06 Jun 2010)
New Revision: 62466
URL: http://svn.boost.org/trac/boost/changeset/62466

Log:
Don't wrap <co> in a <phrase>. Refs #1281.
Text files modified:
   trunk/tools/quickbook/code_snippet.hpp | 10 ++++------
   trunk/tools/quickbook/detail/actions.cpp | 14 +-------------
   trunk/tools/quickbook/test/callouts.gold | 6 +++---
   trunk/tools/quickbook/test/quickbook-manual.gold | 4 ++--
   4 files changed, 10 insertions(+), 24 deletions(-)

Modified: trunk/tools/quickbook/code_snippet.hpp
==============================================================================
--- trunk/tools/quickbook/code_snippet.hpp (original)
+++ trunk/tools/quickbook/code_snippet.hpp 2010-06-06 03:21:10 EDT (Sun, 06 Jun 2010)
@@ -30,9 +30,7 @@
         void pass_thru(iterator first, iterator last);
         void escaped_comment(iterator first, iterator last);
         void compile(iterator first, iterator last);
- void callout(iterator first, iterator last, char const* role);
- void inline_callout(iterator first, iterator last);
- void line_callout(iterator first, iterator last);
+ void callout(iterator first, iterator last);
 
         std::string code;
         std::string snippet;
@@ -109,7 +107,7 @@
 
             rule<Scanner>
                 start_, snippet, identifier, code_elements, escaped_comment,
- inline_callout, line_callout, ignore;
+ ignore;
 
             rule<Scanner> const&
             start() const { return start_; }
@@ -168,13 +166,13 @@
 
                 inline_callout =
                     "/*<"
- >> (*(anychar_p - ">*/")) [boost::bind(&actions_type::inline_callout, &actions, _1, _2)]
+ >> (*(anychar_p - ">*/")) [boost::bind(&actions_type::callout, &actions, _1, _2)]
>> ">*/"
                     ;
 
                 line_callout =
                     "/*<<"
- >> (*(anychar_p - ">>*/")) [boost::bind(&actions_type::line_callout, &actions, _1, _2)]
+ >> (*(anychar_p - ">>*/")) [boost::bind(&actions_type::callout, &actions, _1, _2)]
>> ">>*/"
>> *space_p
                     ;

Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2010-06-06 03:21:10 EDT (Sun, 06 Jun 2010)
@@ -1173,31 +1173,19 @@
         int callout_id = 0;
     }
 
- void code_snippet_actions::callout(iterator first, iterator last, char const* role)
+ void code_snippet_actions::callout(iterator first, iterator last)
     {
         using detail::callout_id;
         code += "``'''";
- code += std::string("<phrase role=\"") + role + "\">";
         code += "<co id=\"";
         code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "co\" ";
         code += "linkends=\"";
         code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "\" />";
- code += "</phrase>";
         code += "'''``";
 
         callouts.push_back(std::string(first, last));
     }
 
- void code_snippet_actions::inline_callout(iterator first, iterator last)
- {
- callout(first, last, "callout_bug");
- }
-
- void code_snippet_actions::line_callout(iterator first, iterator last)
- {
- callout(first, last, "line_callout_bug");
- }
-
     void code_snippet_actions::escaped_comment(iterator first, iterator last)
     {
         if (!code.empty())

Modified: trunk/tools/quickbook/test/callouts.gold
==============================================================================
--- trunk/tools/quickbook/test/callouts.gold (original)
+++ trunk/tools/quickbook/test/callouts.gold 2010-06-06 03:21:10 EDT (Sun, 06 Jun 2010)
@@ -15,7 +15,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> <!--quickbook-escape-prefix--><phrase role="callout_bug"><co id="callout_tests0co" linkends="callout_tests0" /></phrase><!--quickbook-escape-postfix-->
+ <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> <!--quickbook-escape-prefix--><co id="callout_tests0co" linkends="callout_tests0" /><!--quickbook-escape-postfix-->
 <phrase role="special">}</phrase>
 
 </programlisting>
@@ -31,7 +31,7 @@
     <para>
       
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
- <!--quickbook-escape-prefix--><phrase role="line_callout_bug"><co id="callout_tests1co" linkends="callout_tests1" /></phrase><!--quickbook-escape-postfix--><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>
+ <!--quickbook-escape-prefix--><co id="callout_tests1co" linkends="callout_tests1" /><!--quickbook-escape-postfix--><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>
@@ -55,7 +55,7 @@
     <para>
       
 <programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
- <!--quickbook-escape-prefix--><phrase role="line_callout_bug"><co id="callout_tests2co" linkends="callout_tests2" /></phrase><!--quickbook-escape-postfix--><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>
+ <!--quickbook-escape-prefix--><co id="callout_tests2co" linkends="callout_tests2" /><!--quickbook-escape-postfix--><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>

Modified: trunk/tools/quickbook/test/quickbook-manual.gold
==============================================================================
--- trunk/tools/quickbook/test/quickbook-manual.gold (original)
+++ trunk/tools/quickbook/test/quickbook-manual.gold 2010-06-06 03:21:10 EDT (Sun, 06 Jun 2010)
@@ -2612,9 +2612,9 @@
         <para>
           <para>
             
-<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> <!--quickbook-escape-prefix--><phrase role="callout_bug"><co id="quickbook0co" linkends="quickbook0" /></phrase><!--quickbook-escape-postfix-->
+<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> <!--quickbook-escape-prefix--><co id="quickbook0co" linkends="quickbook0" /><!--quickbook-escape-postfix-->
 <phrase role="special">{</phrase>
- <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <!--quickbook-escape-prefix--><phrase role="callout_bug"><co id="quickbook1co" linkends="quickbook1" /></phrase><!--quickbook-escape-postfix-->
+ <phrase role="keyword">return</phrase> <phrase role="string">&quot;foo-bar&quot;</phrase><phrase role="special">;</phrase> <!--quickbook-escape-prefix--><co id="quickbook1co" linkends="quickbook1" /><!--quickbook-escape-postfix-->
 <phrase role="special">}</phrase>
 </programlisting>
           </para>


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