$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r60730 - in branches/quickbook-1.5-spirit2: . doc test
From: daniel_james_at_[hidden]
Date: 2010-03-20 03:56:42
Author: danieljames
Date: 2010-03-20 03:56:38 EDT (Sat, 20 Mar 2010)
New Revision: 60730
URL: http://svn.boost.org/trac/boost/changeset/60730
Log:
Merge from trunk, fixing unicode escapes in the process.
Properties modified: 
   branches/quickbook-1.5-spirit2/   (props changed)
Text files modified: 
   branches/quickbook-1.5-spirit2/doc/quickbook.qbk             |    31 +++++++++++++++++++++++++++++--         
   branches/quickbook-1.5-spirit2/phrase_grammar.cpp            |    16 ++++++++++++----                        
   branches/quickbook-1.5-spirit2/test/unicode-escape.gold      |    17 +++++++++++++++++                       
   branches/quickbook-1.5-spirit2/test/unicode-escape.quickbook |    11 +++++++++--                             
   4 files changed, 67 insertions(+), 8 deletions(-)
Modified: branches/quickbook-1.5-spirit2/doc/quickbook.qbk
==============================================================================
--- branches/quickbook-1.5-spirit2/doc/quickbook.qbk	(original)
+++ branches/quickbook-1.5-spirit2/doc/quickbook.qbk	2010-03-20 03:56:38 EDT (Sat, 20 Mar 2010)
@@ -180,6 +180,16 @@
 * Accept a space between `section:` and the section id.
 * Support table ids.
 
+[h3 Version 1.5.1]
+
+* Improve the post processor's list of block elements. `table`, `entry` and
+  `varlistentry` are treated as blocks. `replaceable` is treated as an inline
+  element.
+* Check that `[section]` and `[endsect]` tags are balanced in templates.
+* Add unicode escape characters, eg. `\u03B1` for \u03B1.
+* Support UTF-8 files with a unicode byte order mark.
+* Disallow `[` in simple markup. Fixes some errors with mismatched punctuation.
+
 [endsect]
 
 [section:syntax Syntax Summary]
@@ -622,6 +632,23 @@
 from the output.
 
 [endsect]
+[section Unicode escape]
+
+You can enter any 16-bit unicode character by using `\u` followed by its 4 digit
+hexadecimal code, or a 32-bit character by using `\U` followed by an 8 digit
+hexadecimal code. eg.
+
+[pre'''
+\u03B1 + \u03B2
+''']
+
+will generate:
+
+[:
+\u03B1 + \u03B2
+]
+
+[endsect]
 [section Images]
 
 [pre'''
@@ -2108,8 +2135,8 @@
     :
         my_doc
     :
-        <xsl:param>boost.image.src=images/my_project_logo.png
-        <xsl:param>boost.image.alt="\\"My Project\\""
+        <xsl:param>boost.image.src\=images/my_project_logo.png
+        <xsl:param>boost.image.alt\="\\"My Project\\""
         <xsl:param>boost.image.w=100
         <xsl:param>boost.image.h=50
         <xsl:param>nav.layout=none
Modified: branches/quickbook-1.5-spirit2/phrase_grammar.cpp
==============================================================================
--- branches/quickbook-1.5-spirit2/phrase_grammar.cpp	(original)
+++ branches/quickbook-1.5-spirit2/phrase_grammar.cpp	2010-03-20 03:56:38 EDT (Sat, 20 Mar 2010)
@@ -146,13 +146,15 @@
         qi::rule<iterator, quickbook::break_()>& escape_break = store_.create();
         qi::rule<iterator, quickbook::formatted()>& escape_punct = store_.create();
         qi::rule<iterator, quickbook::formatted()>& escape_markup = store_.create();
-        qi::rule<iterator, quickbook::unicode_char()>& escape_unicode = store_.create();
+        qi::rule<iterator, quickbook::unicode_char()>& escape_unicode16 = store_.create();
+        qi::rule<iterator, quickbook::unicode_char()>& escape_unicode32 = store_.create();
 
         escape =
             (   escape_break
             |   "\\ "                               // ignore an escaped char            
             |   escape_punct
-            |   escape_unicode
+            |   escape_unicode16
+            |   escape_unicode32
             |   escape_markup                       
             )                                       [actions.process]
             ;
@@ -176,9 +178,15 @@
             >>  "'''"
             ;
 
-        escape_unicode =
+        escape_unicode16 =
                 "\\u"
-            >>  qi::raw[qi::repeat(1,4)[qi::hex]]
+            >>  qi::raw[qi::repeat(4)[qi::xdigit]]
+            >>  qi::attr(nothing())
+            ;
+
+        escape_unicode32 =
+                "\\U"
+            >>  qi::raw[qi::repeat(8)[qi::xdigit]]
             >>  qi::attr(nothing())
             ;
 
Modified: branches/quickbook-1.5-spirit2/test/unicode-escape.gold
==============================================================================
--- branches/quickbook-1.5-spirit2/test/unicode-escape.gold	(original)
+++ branches/quickbook-1.5-spirit2/test/unicode-escape.gold	2010-03-20 03:56:38 EDT (Sat, 20 Mar 2010)
@@ -82,4 +82,21 @@
       Ωω Omega
     </listitem>
   </itemizedlist>
+  <para>
+    In the unlikely event that you've got a Mahjong font:
+  </para>
+  <itemizedlist>
+    <listitem>
+      🀀 East Wind
+    </listitem>
+    <listitem>
+      🀁 South Wind
+    </listitem>
+    <listitem>
+      🀂 West Wind
+    </listitem>
+    <listitem>
+      🀃 North Wind
+    </listitem>
+  </itemizedlist>
 </article>
Modified: branches/quickbook-1.5-spirit2/test/unicode-escape.quickbook
==============================================================================
--- branches/quickbook-1.5-spirit2/test/unicode-escape.quickbook	(original)
+++ branches/quickbook-1.5-spirit2/test/unicode-escape.quickbook	2010-03-20 03:56:38 EDT (Sat, 20 Mar 2010)
@@ -2,7 +2,7 @@
     [quickbook 1.5]
 ]
 
-[heading I\uF1t\uEBrn\uE2ti\uF4n\uE0liz\uE6ti\uF8n]
+[heading I\u00F1t\u00EBrn\u00E2ti\u00F4n\u00E0liz\u00E6ti\u00F8n]
 
 * \u0391\u03B1 Alpha
 * \u0392\u03B2 Beta
@@ -27,4 +27,11 @@
 * \u03A6\u03C6 Phi
 * \u03A7\u03C7 Chi
 * \u03A8\u03C8 Psi
-* \u03A9\u03C9 Omega
\ No newline at end of file
+* \u03A9\u03C9 Omega
+
+In the unlikely event that you've got a Mahjong font:
+
+* \U0001F000 East Wind
+* \U0001F001 South Wind
+* \U0001F002 West Wind
+* \U0001F003 North Wind
\ No newline at end of file