Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73110 - in branches/release/tools/quickbook: . doc src test
From: dnljms_at_[hidden]
Date: 2011-07-14 15:22:59


Author: danieljames
Date: 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
New Revision: 73110
URL: http://svn.boost.org/trac/boost/changeset/73110

Log:
Quickbook: XML encode escaped punctuation.
Properties modified:
   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)
Text files modified:
   branches/release/tools/quickbook/doc/quickbook.qbk | 4 ++++
   branches/release/tools/quickbook/src/actions.cpp | 16 ----------------
   branches/release/tools/quickbook/src/actions.hpp | 16 ----------------
   branches/release/tools/quickbook/src/actions_class.cpp | 1 -
   branches/release/tools/quickbook/src/actions_class.hpp | 1 -
   branches/release/tools/quickbook/src/doc_info_grammar.cpp | 2 +-
   branches/release/tools/quickbook/src/main_grammar.cpp | 2 +-
   branches/release/tools/quickbook/src/quickbook.cpp | 2 +-
   branches/release/tools/quickbook/test/escape.gold | 3 +++
   branches/release/tools/quickbook/test/escape.quickbook | 2 ++
   branches/release/tools/quickbook/test/simple_markup.gold | 2 +-
   branches/release/tools/quickbook/test/simple_markup.quickbook | 2 +-
   12 files changed, 14 insertions(+), 39 deletions(-)

Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk (original)
+++ branches/release/tools/quickbook/doc/quickbook.qbk 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -294,6 +294,10 @@
     `[ordered_list [item1][item2]]` or
     `[itemized_list [item1][item2]]`.
 
+[heading Version 1.5.6 - Boost 1.48]
+
+* Xml encode escaped punctuation (eg. `\<` is correctly encodes to \<).
+
 [endsect] [/Change log]
 
 [section:syntax Syntax Summary]

Modified: branches/release/tools/quickbook/src/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.cpp (original)
+++ branches/release/tools/quickbook/src/actions.cpp 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -664,22 +664,6 @@
         out << "</code>";
     }
 
- void raw_char_action::operator()(char ch) const
- {
- if (actions.suppress) return;
- write_anchors(actions, phrase);
-
- phrase << ch;
- }
-
- void raw_char_action::operator()(iterator first, iterator /*last*/) const
- {
- if (actions.suppress) return;
- write_anchors(actions, phrase);
-
- phrase << *first;
- }
-
     void plain_char_action::operator()(char ch) const
     {
         if (actions.suppress) return;

Modified: branches/release/tools/quickbook/src/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions.hpp (original)
+++ branches/release/tools/quickbook/src/actions.hpp 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -252,22 +252,6 @@
         std::string& save;
     };
 
- struct raw_char_action
- {
- // Prints a single raw (unprocessed) char.
- // Allows '<', '>'... etc.
-
- raw_char_action(collector& phrase, quickbook::actions& actions)
- : phrase(phrase)
- , actions(actions) {}
-
- void operator()(char ch) const;
- void operator()(iterator first, iterator /*last*/) const;
-
- collector& phrase;
- quickbook::actions& actions;
- };
-
     struct plain_char_action
     {
         // Prints a single plain char.

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-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -72,7 +72,6 @@
         , paragraph(*this)
         , space_char(phrase)
         , plain_char(phrase, *this)
- , raw_char(phrase, *this)
         , escape_unicode(phrase, *this)
 
         , simple_markup(phrase, *this)

Modified: branches/release/tools/quickbook/src/actions_class.hpp
==============================================================================
--- branches/release/tools/quickbook/src/actions_class.hpp (original)
+++ branches/release/tools/quickbook/src/actions_class.hpp 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -121,7 +121,6 @@
         paragraph_action paragraph;
         space space_char;
         plain_char_action plain_char;
- raw_char_action raw_char;
         escape_unicode_action escape_unicode;
 
         simple_phrase_action simple_markup;

Modified: branches/release/tools/quickbook/src/doc_info_grammar.cpp
==============================================================================
--- branches/release/tools/quickbook/src/doc_info_grammar.cpp (original)
+++ branches/release/tools/quickbook/src/doc_info_grammar.cpp 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -240,7 +240,7 @@
         local.char_ =
                 cl::str_p("\\n") [actions.break_]
             | "\\ " // ignore an escaped space
- | '\\' >> cl::punct_p [actions.raw_char]
+ | '\\' >> cl::punct_p [actions.plain_char]
             | "\\u" >> cl::repeat_p(4)
                     [cl::chset<>("0-9a-fA-F")]
                                             [actions.escape_unicode]

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-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -457,7 +457,7 @@
         local.escape =
                 cl::str_p("\\n") [actions.break_]
             | cl::str_p("\\ ") // ignore an escaped space
- | '\\' >> cl::punct_p [actions.raw_char]
+ | '\\' >> cl::punct_p [actions.plain_char]
             | "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")]
                                                 [actions.escape_unicode]
             | "\\U" >> cl::repeat_p(8) [cl::chset<>("0-9a-fA-F")]

Modified: branches/release/tools/quickbook/src/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/src/quickbook.cpp (original)
+++ branches/release/tools/quickbook/src/quickbook.cpp 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -34,7 +34,7 @@
 #pragma warning(disable:4355)
 #endif
 
-#define QUICKBOOK_VERSION "Quickbook Version 1.5.5"
+#define QUICKBOOK_VERSION "Quickbook Version 1.5.6 (release)"
 
 namespace quickbook
 {

Modified: branches/release/tools/quickbook/test/escape.gold
==============================================================================
--- branches/release/tools/quickbook/test/escape.gold (original)
+++ branches/release/tools/quickbook/test/escape.gold 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -10,5 +10,8 @@
     <para>
       This letter &#x3B1; should have a space either side of it.
     </para>
+ <para>
+ These should be properly encoded: &gt; &lt; &quot;
+ </para>
   </section>
 </article>

Modified: branches/release/tools/quickbook/test/escape.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/escape.quickbook (original)
+++ branches/release/tools/quickbook/test/escape.quickbook 2011-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -9,5 +9,7 @@
 
 This letter '''&#x3B1;''' should have a space either side of it.
 
+These should be properly encoded: \> \< \"
+
 [endsect]
 

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-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -46,7 +46,7 @@
       <literal>_mac\ ro_</literal>
     </para>
     <para>
- <emphasis>not italic\</emphasis>
+ <emphasis>italic\</emphasis>
     </para>
     <para>
       These shouldn't be interepted as markup: == // **

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-07-14 15:22:57 EDT (Thu, 14 Jul 2011)
@@ -33,7 +33,7 @@
 
 =_mac\ ro_=
 
-/not italic\/
+/italic\/
 
 These shouldn't be interepted as markup: == // **
 


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