|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r66292 - in trunk/tools/quickbook: src test
From: dnljms_at_[hidden]
Date: 2010-10-30 19:16:22
Author: danieljames
Date: 2010-10-30 19:16:21 EDT (Sat, 30 Oct 2010)
New Revision: 66292
URL: http://svn.boost.org/trac/boost/changeset/66292
Log:
Restore \n support to quickbook.
Added:
trunk/tools/quickbook/test/newline.gold (contents, props changed)
trunk/tools/quickbook/test/newline.quickbook (contents, props changed)
Text files modified:
trunk/tools/quickbook/src/phrase_grammar.hpp | 3 ++-
trunk/tools/quickbook/test/Jamfile.v2 | 1 +
2 files changed, 3 insertions(+), 1 deletions(-)
Modified: trunk/tools/quickbook/src/phrase_grammar.hpp
==============================================================================
--- trunk/tools/quickbook/src/phrase_grammar.hpp (original)
+++ trunk/tools/quickbook/src/phrase_grammar.hpp 2010-10-30 19:16:21 EDT (Sat, 30 Oct 2010)
@@ -299,7 +299,8 @@
;
escape =
- cl::str_p("\\ ") // ignore an escaped space
+ cl::str_p("\\n") [actions.break_]
+ | cl::str_p("\\ ") // ignore an escaped space
| '\\' >> cl::punct_p [actions.raw_char]
| "\\u" >> cl::repeat_p(4) [cl::chset<>("0-9a-fA-F")]
[actions.escape_unicode]
Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 (original)
+++ trunk/tools/quickbook/test/Jamfile.v2 2010-10-30 19:16:21 EDT (Sat, 30 Oct 2010)
@@ -55,6 +55,7 @@
[ quickbook-test xml-escape_1_2 ]
[ quickbook-test xml-escape_1_5 ]
[ quickbook-test blocks ]
+ [ quickbook-test newline ]
[ quickbook-test command_line_macro : : : <quickbook-define>__macro__=*bold* ]
[ quickbook-fail-test fail-include ]
[ quickbook-fail-test fail-import ]
Added: trunk/tools/quickbook/test/newline.gold
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/newline.gold 2010-10-30 19:16:21 EDT (Sat, 30 Oct 2010)
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE article PUBLIC "-//Boost//DTD BoostBook XML V1.0//EN" "http://www.boost.org/tools/boostbook/dtd/boostbook.dtd">
+<article id="test_newlines" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Test newlines</title>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+ <para>
+ Line 1<sbr/> Line 2
+ </para>
+ <blockquote>
+ <para>
+ <quote>It is better to be approximately right than exactly wrong.</quote><sbr/>
+ <emphasis>-- Old adage</emphasis>
+ </para>
+ </blockquote>
+</article>
Added: trunk/tools/quickbook/test/newline.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/newline.quickbook 2010-10-30 19:16:21 EDT (Sat, 30 Oct 2010)
@@ -0,0 +1,10 @@
+[article Test newlines
+]
+
+Line 1\nLine 2
+
+[:["It is better to be approximately right than exactly wrong.]\n['-- Old adage]]
+
+Line 1[br]Line 2
+
+[:["It is better to be approximately right than exactly wrong.][br]['-- Old adage]]
\ 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