Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r59711 - in trunk/tools/quickbook: . test
From: daniel_james_at_[hidden]
Date: 2010-02-16 17:34:10


Author: danieljames
Date: 2010-02-16 17:34:09 EST (Tue, 16 Feb 2010)
New Revision: 59711
URL: http://svn.boost.org/trac/boost/changeset/59711

Log:
Don't allow '[' in simple_markup. Fixes #1844.
Added:
   trunk/tools/quickbook/test/simple_markup.gold (contents, props changed)
   trunk/tools/quickbook/test/simple_markup.quickbook (contents, props changed)
Text files modified:
   trunk/tools/quickbook/phrase.hpp | 12 +++++++-----
   trunk/tools/quickbook/test/Jamfile.v2 | 1 +
   2 files changed, 8 insertions(+), 5 deletions(-)

Modified: trunk/tools/quickbook/phrase.hpp
==============================================================================
--- trunk/tools/quickbook/phrase.hpp (original)
+++ trunk/tools/quickbook/phrase.hpp 2010-02-16 17:34:09 EST (Tue, 16 Feb 2010)
@@ -223,14 +223,16 @@
                     | simple_teletype
                     ;
 
+ simple_phrase_end = '[' | phrase_end;
+
                 simple_markup(simple_bold,
- '*', actions.simple_bold, phrase_end);
+ '*', actions.simple_bold, simple_phrase_end);
                 simple_markup(simple_italic,
- '/', actions.simple_italic, phrase_end);
+ '/', actions.simple_italic, simple_phrase_end);
                 simple_markup(simple_underline,
- '_', actions.simple_underline, phrase_end);
+ '_', actions.simple_underline, simple_phrase_end);
                 simple_markup(simple_teletype,
- '=', actions.simple_teletype, phrase_end);
+ '=', actions.simple_teletype, simple_phrase_end);
 
                 phrase =
                    *( common
@@ -462,7 +464,7 @@
             }
 
             rule<Scanner> space, blank, comment, phrase, phrase_markup, image,
- phrase_end, bold, italic, underline, teletype,
+ simple_phrase_end, phrase_end, bold, italic, underline, teletype,
                             strikethrough, escape, url, common, funcref, classref,
                             memberref, enumref, macroref, headerref, conceptref, globalref,
                             anchor, link, hard_space, eol, inline_code, simple_format,

Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 (original)
+++ trunk/tools/quickbook/test/Jamfile.v2 2010-02-16 17:34:09 EST (Tue, 16 Feb 2010)
@@ -33,6 +33,7 @@
     [ quickbook-test table_1_5 ]
     [ quickbook-test image_1_5 ]
     [ quickbook-test callouts ]
+ [ quickbook-test simple_markup ]
     [ quickbook-fail-test fail-include ]
     [ quickbook-fail-test fail-import ]
     [ quickbook-fail-test fail-template-arguments1 ]

Added: trunk/tools/quickbook/test/simple_markup.gold
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/simple_markup.gold 2010-02-16 17:34:09 EST (Tue, 16 Feb 2010)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="simple_markup_test" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Simple Markup Test</title>
+ <articleinfo>
+ </articleinfo>
+ <section id="simple_markup_test.simple_markup">
+ <title><link linkend="simple_markup_test.simple_markup">Simple Markup</link></title>
+ <para>
+ <emphasis>italic</emphasis> <emphasis role="bold">bold</emphasis> <emphasis
+ role="underline">underline</emphasis> <literal>teletype</literal>
+ </para>
+ <para>
+ /all<emphasis>italic</emphasis> * not bold*
+ </para>
+ <para>
+ /not italic <ulink url="http://www.boost.org/"><emphasis role="bold">bold</emphasis></ulink>
+ </para>
+ </section>
+</article>

Added: trunk/tools/quickbook/test/simple_markup.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/simple_markup.quickbook 2010-02-16 17:34:09 EST (Tue, 16 Feb 2010)
@@ -0,0 +1,13 @@
+[article Simple Markup Test
+[quickbook 1.5]
+]
+
+[section Simple Markup]
+
+/italic/ *bold* _underline_ =teletype=
+
+/all/italic/ * not bold*
+
+/not italic [@http://www.boost.org/ *bold*]
+
+[endsect]
\ No newline at end of file


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