|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r53503 - in branches/quickbook-1.5: . test
From: daniel_james_at_[hidden]
Date: 2009-05-31 11:35:01
Author: danieljames
Date: 2009-05-31 11:35:01 EDT (Sun, 31 May 2009)
New Revision: 53503
URL: http://svn.boost.org/trac/boost/changeset/53503
Log:
Make sure that a template expansion ends with a ']'.
{{{
[template foo 1]
[fool]
}}}
was generating `1[fool]` - the template would be expanded but then when it
didn't match the `]` it would fail and just get copied to the output. This
change checks for `]` before expanding the template. So it now generates
`[fool]` which is an improvement.
I'm not including a version switch as I see this as a plain bug fix - I can't
imagine this change ever being anything but beneficial.
Text files modified:
branches/quickbook-1.5/phrase.hpp | 1 +
branches/quickbook-1.5/test/templates.gold | 3 +++
branches/quickbook-1.5/test/templates.quickbook | 6 ++++++
3 files changed, 10 insertions(+), 0 deletions(-)
Modified: branches/quickbook-1.5/phrase.hpp
==============================================================================
--- branches/quickbook-1.5/phrase.hpp (original)
+++ branches/quickbook-1.5/phrase.hpp 2009-05-31 11:35:01 EDT (Sun, 31 May 2009)
@@ -145,6 +145,7 @@
>> !(hard_space
>> template_args)
) )
+ >> eps_p(']')
;
brackets =
Modified: branches/quickbook-1.5/test/templates.gold
==============================================================================
--- branches/quickbook-1.5/test/templates.gold (original)
+++ branches/quickbook-1.5/test/templates.gold 2009-05-31 11:35:01 EDT (Sun, 31 May 2009)
@@ -67,5 +67,8 @@
<para>
.0 00
</para>
+ <para>
+ [fool]
+ </para>
</section>
</article>
Modified: branches/quickbook-1.5/test/templates.quickbook
==============================================================================
--- branches/quickbook-1.5/test/templates.quickbook (original)
+++ branches/quickbook-1.5/test/templates.quickbook 2009-05-31 11:35:01 EDT (Sun, 31 May 2009)
@@ -100,4 +100,10 @@
[template test[x] [join1 [join2 0 [x]]...0]]
[test 0]
+[/-------------------------------- Mismatched template ]
+
+[template foo 1]
+[fool]
+
[endsect]
+
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