$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r72545 - in branches/release/tools: . bcp boostbook build/v2 inspect quickbook quickbook/doc quickbook/src quickbook/test quickbook/test/snippets regression regression/src release wave
From: dnljms_at_[hidden]
Date: 2011-06-11 12:57:02
Author: danieljames
Date: 2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
New Revision: 72545
URL: http://svn.boost.org/trac/boost/changeset/72545
Log:
Quickbook: Don't match double marks in simple markup.
Properties modified: 
   branches/release/tools/   (props changed)
   branches/release/tools/bcp/   (props changed)
   branches/release/tools/boostbook/   (props changed)
   branches/release/tools/build/v2/   (props changed)
   branches/release/tools/inspect/   (props changed)
   branches/release/tools/quickbook/   (props changed)
   branches/release/tools/quickbook/doc/   (props changed)
   branches/release/tools/quickbook/src/   (props changed)
   branches/release/tools/quickbook/test/   (props changed)
   branches/release/tools/regression/   (props changed)
   branches/release/tools/regression/src/library_status.cpp   (props changed)
   branches/release/tools/release/   (props changed)
   branches/release/tools/wave/   (props changed)
Text files modified: 
   branches/release/tools/quickbook/src/actions.cpp              |    14 +++-----------                          
   branches/release/tools/quickbook/src/actions.hpp              |     3 ---                                     
   branches/release/tools/quickbook/src/actions_class.cpp        |     2 +-                                      
   branches/release/tools/quickbook/src/main_grammar.cpp         |    23 +++++++++++++++--------                 
   branches/release/tools/quickbook/test/simple_markup.gold      |     6 ++++--                                  
   branches/release/tools/quickbook/test/simple_markup.quickbook |     6 ++++--                                  
   branches/release/tools/quickbook/test/snippets/pass_thru.cpp  |     2 +-                                      
   7 files changed, 28 insertions(+), 28 deletions(-)
Modified: branches/release/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.cpp	(original)
+++ branches/release/tools/quickbook/src/actions.cpp	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -193,9 +193,8 @@
         if(!actions.warned_about_breaks)
         {
             detail::outwarn(actions.filename, pos.line)
-                << "line breaks generate invalid boostbook"
-                << "    (will only note first occurrence)."
-                << "\n";
+                << "line breaks generate invalid boostbook "
+                   "(will only note first occurrence).\n";
 
             actions.warned_about_breaks = true;
         }
@@ -380,14 +379,7 @@
         values.finish();
 
         out << markup.pre;
-        if (std::string const* ptr = find(macro, content.get_quickbook().c_str()))
-        {
-            out << *ptr;
-        }
-        else
-        {
-            out << content.get_boostbook();
-        }
+        out << content.get_boostbook();
         out << markup.post;
     }
 
Modified: branches/release/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.hpp	(original)
+++ branches/release/tools/quickbook/src/actions.hpp	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -124,16 +124,13 @@
 
         simple_phrase_action(
             collector& out
-          , string_symbols const& macro
           , quickbook::actions& actions)
         : out(out)
-        , macro(macro)
         , actions(actions) {}
 
         void operator()(char) const;
 
         collector& out;
-        string_symbols const& macro;
         quickbook::actions& actions;
     };
 
Modified: branches/release/tools/quickbook/src/actions_class.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions_class.cpp	(original)
+++ branches/release/tools/quickbook/src/actions_class.cpp	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -75,7 +75,7 @@
         , raw_char(phrase, *this)
         , escape_unicode(phrase, *this)
 
-        , simple_markup(phrase, macro, *this)
+        , simple_markup(phrase, *this)
 
         , break_(phrase, *this)
         , do_macro(phrase, *this)
Modified: branches/release/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/main_grammar.cpp	(original)
+++ branches/release/tools/quickbook/src/main_grammar.cpp	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -368,10 +368,10 @@
             ;
 
         local.simple_markup =
-                cl::chset<>("*/_=")            [local.simple_markup.mark = ph::arg1]
-            >>  cl::eps_p(cl::graph_p)         // graph_p must follow first mark
+                cl::chset<>("*/_=")             [local.simple_markup.mark = ph::arg1]
+            >>  cl::eps_p(cl::graph_p)          // graph_p must follow first mark
             >>  lookback
-                [   cl::anychar_p
+                [   cl::anychar_p               // skip back over the markup
                 >>  ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
                                                 // first mark not be preceeded by
                                                 // the same character.
@@ -384,11 +384,18 @@
                 [
                     actions.scoped_output()
                     [
-                        (+( ~cl::eps_p(local.simple_markup_end)
-                        >>  local.nested_char
-                        ))                      [actions.docinfo_value(ph::arg1, ph::arg2)]
-                    ]                           
-                    >>  cl::f_ch_p(local.simple_markup.mark)
+                        (   cl::eps_p(actions.macro >> local.simple_markup_end)
+                        >>  actions.macro       [actions.do_macro]
+                        |   ~cl::eps_p(cl::f_ch_p(local.simple_markup.mark))
+                        >>  +(  ~cl::eps_p
+                                (   lookback [~cl::f_ch_p(local.simple_markup.mark)]
+                                >>  local.simple_markup_end
+                                )
+                            >>  local.nested_char
+                            )
+                        )                       [actions.to_value]
+                    ]
+                >>  cl::f_ch_p(local.simple_markup.mark)
                                                 [actions.simple_markup]
                 ]
             ;
Modified: branches/release/tools/quickbook/test/simple_markup.gold
==============================================================================
--- branches/release/tools/quickbook/test/simple_markup.gold	(original)
+++ branches/release/tools/quickbook/test/simple_markup.gold	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -10,8 +10,10 @@
       role="underline">underline</emphasis> <literal>teletype</literal>
     </para>
     <para>
-      <emphasis>/italic/</emphasis> <emphasis role="bold">*bold*</emphasis> <emphasis
-      role="underline">_underline_</emphasis> <literal>=teletype=</literal>
+      //not italic// **not bold** __not underline__ ==not teletype==
+    </para>
+    <para>
+      <emphasis role="underline">odd__ edge case</emphasis>
     </para>
     <para>
       not__underlined__hopefully
Modified: branches/release/tools/quickbook/test/simple_markup.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/simple_markup.quickbook	(original)
+++ branches/release/tools/quickbook/test/simple_markup.quickbook	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -8,7 +8,9 @@
 
 /italic/ *bold* _underline_ =teletype=
 
-//italic// **bold** __underline__ ==teletype==
+//not italic// **not bold** __not underline__ ==not teletype==
+
+_odd__ edge case_
 
 not__underlined__hopefully
 
@@ -35,4 +37,4 @@
 
 These shouldn't be interepted as markup: == // **
 
-[endsect]
\ No newline at end of file
+[endsect]
Modified: branches/release/tools/quickbook/test/snippets/pass_thru.cpp
==============================================================================
--- branches/release/tools/quickbook/test/snippets/pass_thru.cpp	(original)
+++ branches/release/tools/quickbook/test/snippets/pass_thru.cpp	2011-06-11 12:57:01 EDT (Sat, 11 Jun 2011)
@@ -19,4 +19,4 @@
   int x;
 //->
 };
-//]
\ No newline at end of file
+//]