|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63732 - in trunk/tools/quickbook: detail doc test
From: daniel_james_at_[hidden]
Date: 2010-07-08 03:12:01
Author: danieljames
Date: 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
New Revision: 63732
URL: http://svn.boost.org/trac/boost/changeset/63732
Log:
Fix identifier generation for headings. Refs #1436.
Added:
trunk/tools/quickbook/test/identifier_1_5.gold (contents, props changed)
trunk/tools/quickbook/test/identifier_1_5.quickbook (contents, props changed)
trunk/tools/quickbook/test/identifier_1_6.gold (contents, props changed)
trunk/tools/quickbook/test/identifier_1_6.quickbook (contents, props changed)
Text files modified:
trunk/tools/quickbook/detail/actions.cpp | 16 ++++++++++++----
trunk/tools/quickbook/doc/quickbook.qbk | 3 +++
trunk/tools/quickbook/test/Jamfile.v2 | 2 ++
3 files changed, 17 insertions(+), 4 deletions(-)
Modified: trunk/tools/quickbook/detail/actions.cpp
==============================================================================
--- trunk/tools/quickbook/detail/actions.cpp (original)
+++ trunk/tools/quickbook/detail/actions.cpp 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -105,8 +105,12 @@
}
else // version 1.3 and above
{
- std::string anchor = fully_qualified_id(library_id, qualified_section_id,
- detail::make_identifier(str.begin(), str.end()));
+ std::string id = qbk_version_n >= 106 ?
+ detail::make_identifier(first, last) :
+ detail::make_identifier(str.begin(), str.end());
+
+ std::string anchor =
+ fully_qualified_id(library_id, qualified_section_id, id);
out << "<anchor id=\"" << anchor << "\"/>"
<< pre
@@ -128,8 +132,12 @@
std::string str;
phrase.swap(str);
- std::string anchor = fully_qualified_id(library_id, qualified_section_id,
- detail::make_identifier(str.begin(), str.end()));
+ std::string id = qbk_version_n >= 106 ?
+ detail::make_identifier(first, last) :
+ detail::make_identifier(str.begin(), str.end());
+
+ std::string anchor =
+ fully_qualified_id(library_id, qualified_section_id, id);
out
<< "<anchor id=\"" << anchor << "\"/>"
Modified: trunk/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- trunk/tools/quickbook/doc/quickbook.qbk (original)
+++ trunk/tools/quickbook/doc/quickbook.qbk 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -204,6 +204,9 @@
* Don't require commas between authors in docinfo.
* Allow empty document bodies.
* Less empty paragraphs.
+* Preparing for quickbook 1.6:
+ * When automatically generating ids for headers, use the quickbook
+ source, rather than the generated docbook.
[endsect]
Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 (original)
+++ trunk/tools/quickbook/test/Jamfile.v2 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -33,6 +33,8 @@
[ quickbook-test section_1_4 ]
[ quickbook-test section_1_5 ]
[ quickbook-test heading ]
+ [ quickbook-test identifier_1_5 ]
+ [ quickbook-test identifier_1_6 ]
[ quickbook-test para-test ]
[ quickbook-test table_1_5 ]
[ quickbook-test image_1_5 ]
Added: trunk/tools/quickbook/test/identifier_1_5.gold
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/identifier_1_5.gold 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -0,0 +1,13 @@
+<?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="identifiers_in_quickbook_1_5" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.5</title>
+ <articleinfo>
+ </articleinfo>
+ <anchor id="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_"/>
+ <bridgehead renderas="sect2">
+ <link linkend="identifiers_in_quickbook_1_5.test_heading_with__code__phrase_role__identifier__code__phrase___code_">Test
+ heading with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+</article>
Added: trunk/tools/quickbook/test/identifier_1_5.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/identifier_1_5.quickbook 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -0,0 +1,5 @@
+[article Identifiers in quickbook 1.5
+ [quickbook 1.5]
+]
+
+[heading Test heading with `code`]
\ No newline at end of file
Added: trunk/tools/quickbook/test/identifier_1_6.gold
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/identifier_1_6.gold 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -0,0 +1,13 @@
+<?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="identifiers_in_quickbook_1_6" last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <title>Identifiers in quickbook 1.6</title>
+ <articleinfo>
+ </articleinfo>
+ <anchor id="identifiers_in_quickbook_1_6.test_heading_with__code_"/>
+ <bridgehead renderas="sect2">
+ <link linkend="identifiers_in_quickbook_1_6.test_heading_with__code_">Test heading
+ with <code><phrase role="identifier">code</phrase></code></link>
+ </bridgehead>
+</article>
Added: trunk/tools/quickbook/test/identifier_1_6.quickbook
==============================================================================
--- (empty file)
+++ trunk/tools/quickbook/test/identifier_1_6.quickbook 2010-07-08 03:11:58 EDT (Thu, 08 Jul 2010)
@@ -0,0 +1,5 @@
+[article Identifiers in quickbook 1.6
+ [quickbook 1.6]
+]
+
+[heading Test heading with `code`]
\ 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