|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r63815 - in branches/release/tools/quickbook: . detail doc test
From: daniel_james_at_[hidden]
Date: 2010-07-10 11:25:29
Author: danieljames
Date: 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
New Revision: 63815
URL: http://svn.boost.org/trac/boost/changeset/63815
Log:
Merge quickbook.
Fixes #4302, #1436, #3907, #4416
Added:
branches/release/tools/quickbook/test/doc-info-3.gold
- copied unchanged from r63621, /trunk/tools/quickbook/test/doc-info-3.gold
branches/release/tools/quickbook/test/doc-info-3.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/doc-info-3.quickbook
branches/release/tools/quickbook/test/doc-info-4.gold
- copied unchanged from r63621, /trunk/tools/quickbook/test/doc-info-4.gold
branches/release/tools/quickbook/test/doc-info-4.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/doc-info-4.quickbook
branches/release/tools/quickbook/test/empty.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/empty.quickbook
branches/release/tools/quickbook/test/fail-unknown-quickbook-1.quickbook
- copied unchanged from r63814, /trunk/tools/quickbook/test/fail-unknown-quickbook-1.quickbook
branches/release/tools/quickbook/test/fail-unknown-quickbook-2.quickbook
- copied unchanged from r63814, /trunk/tools/quickbook/test/fail-unknown-quickbook-2.quickbook
branches/release/tools/quickbook/test/fail-unknown-quickbook-3.quickbook
- copied unchanged from r63814, /trunk/tools/quickbook/test/fail-unknown-quickbook-3.quickbook
branches/release/tools/quickbook/test/identifier_1_5.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/identifier_1_5.gold
branches/release/tools/quickbook/test/identifier_1_5.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/identifier_1_5.quickbook
branches/release/tools/quickbook/test/identifier_1_6.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/identifier_1_6.gold
branches/release/tools/quickbook/test/identifier_1_6.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/identifier_1_6.quickbook
branches/release/tools/quickbook/test/include_1_6-2.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/include_1_6-2.gold
branches/release/tools/quickbook/test/include_1_6-2.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/include_1_6-2.quickbook
branches/release/tools/quickbook/test/include_1_6.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/include_1_6.gold
branches/release/tools/quickbook/test/include_1_6.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/include_1_6.quickbook
branches/release/tools/quickbook/test/mismatched-brackets-1.gold
- copied unchanged from r63621, /trunk/tools/quickbook/test/mismatched-brackets-1.gold
branches/release/tools/quickbook/test/mismatched-brackets-1.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/mismatched-brackets-1.quickbook
branches/release/tools/quickbook/test/mismatched-brackets-2.gold
- copied unchanged from r63621, /trunk/tools/quickbook/test/mismatched-brackets-2.gold
branches/release/tools/quickbook/test/mismatched-brackets-2.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/mismatched-brackets-2.quickbook
branches/release/tools/quickbook/test/mismatched-brackets-3.quickbook
- copied unchanged from r63621, /trunk/tools/quickbook/test/mismatched-brackets-3.quickbook
branches/release/tools/quickbook/test/xml-escape_1_2.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/xml-escape_1_2.gold
branches/release/tools/quickbook/test/xml-escape_1_2.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/xml-escape_1_2.quickbook
branches/release/tools/quickbook/test/xml-escape_1_5.gold
- copied unchanged from r63754, /trunk/tools/quickbook/test/xml-escape_1_5.gold
branches/release/tools/quickbook/test/xml-escape_1_5.quickbook
- copied unchanged from r63754, /trunk/tools/quickbook/test/xml-escape_1_5.quickbook
Properties modified:
branches/release/tools/quickbook/ (props changed)
Text files modified:
branches/release/tools/quickbook/block.hpp | 16
branches/release/tools/quickbook/detail/actions.cpp | 449 ++++++++++++++++++++++++++-------------
branches/release/tools/quickbook/detail/actions.hpp | 42 +++
branches/release/tools/quickbook/detail/actions_class.cpp | 5
branches/release/tools/quickbook/detail/actions_class.hpp | 5
branches/release/tools/quickbook/detail/quickbook.cpp | 4
branches/release/tools/quickbook/detail/quickbook.hpp | 4
branches/release/tools/quickbook/detail/template_stack.cpp | 19 +
branches/release/tools/quickbook/detail/template_stack.hpp | 45 ++-
branches/release/tools/quickbook/doc/quickbook.qbk | 30 ++
branches/release/tools/quickbook/doc_info.hpp | 14
branches/release/tools/quickbook/phrase.hpp | 12
branches/release/tools/quickbook/test/Jamfile.v2 | 14 +
branches/release/tools/quickbook/test/callouts.gold | 78 ++++--
branches/release/tools/quickbook/test/callouts.quickbook | 4
branches/release/tools/quickbook/test/code-block-teletype.gold | 2
branches/release/tools/quickbook/test/doc-info-1.gold | 11
branches/release/tools/quickbook/test/doc-info-1.quickbook | 5
branches/release/tools/quickbook/test/doc-info-2.gold | 11
branches/release/tools/quickbook/test/doc-info-2.quickbook | 3
branches/release/tools/quickbook/test/image_1_5.gold | 7
branches/release/tools/quickbook/test/image_1_5.quickbook | 5
branches/release/tools/quickbook/test/import.gold | 140 +++++------
branches/release/tools/quickbook/test/include_1_5.quickbook | 4
branches/release/tools/quickbook/test/quickbook-manual.gold | 112 +++------
branches/release/tools/quickbook/test/table_1_5.gold | 33 ++
branches/release/tools/quickbook/test/table_1_5.quickbook | 5
branches/release/tools/quickbook/test/template-section.gold | 30 +-
branches/release/tools/quickbook/test/template-section.quickbook | 2
branches/release/tools/quickbook/test/templates.gold | 23 -
branches/release/tools/quickbook/test/templates.quickbook | 37 +++
branches/release/tools/quickbook/test/templates_1_4.gold | 2
branches/release/tools/quickbook/test/templates_1_4.quickbook | 3
33 files changed, 753 insertions(+), 423 deletions(-)
Modified: branches/release/tools/quickbook/block.hpp
==============================================================================
--- branches/release/tools/quickbook/block.hpp (original)
+++ branches/release/tools/quickbook/block.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -54,12 +54,13 @@
}
blocks =
- +( block_markup
+ *( block_markup
| code
| list [actions.list]
| hr [actions.hr]
| comment >> +eol
- | paragraph [actions.paragraph]
+ | paragraph [actions.inside_paragraph]
+ [actions.write_paragraphs]
| eol
)
;
@@ -232,7 +233,9 @@
template_ =
"template"
- >> hard_space >> template_id [push_back_a(actions.template_info)]
+ >> hard_space
+ >> template_id [assign_a(actions.template_identifier)]
+ [clear_a(actions.template_info)]
>>
!(
space >> '['
@@ -246,7 +249,8 @@
template_body =
*(('[' >> template_body >> ']') | (anychar_p - ']'))
- >> space >> eps_p(']')
+ >> eps_p(space >> ']')
+ >> space
;
variablelist =
@@ -413,7 +417,7 @@
;
paragraph =
- *( common
+ +( common
| (anychar_p - // Make sure we don't go past
paragraph_end // a single block.
) [actions.plain_char]
@@ -457,5 +461,3 @@
}
#endif // BOOST_SPIRIT_QUICKBOOK_BLOCK_HPP
-
-
Modified: branches/release/tools/quickbook/detail/actions.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions.cpp (original)
+++ branches/release/tools/quickbook/detail/actions.cpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -67,6 +67,28 @@
out << pre << str << post;
}
+ void implicit_paragraph_action::operator()() const
+ {
+ std::string str;
+ phrase.swap(str);
+
+ // TODO: Use spirit to do this?
+
+ std::string::const_iterator
+ pos = str.begin(),
+ end = str.end();
+
+ while(pos != end && (
+ *pos == ' ' || *pos == '\t' || *pos == '\n' || *pos == '\r'))
+ {
+ ++pos;
+ }
+
+ if(pos != end) {
+ out << pre << str << post;
+ }
+ }
+
void header_action::operator()(iterator first, iterator last) const
{
std::string str;
@@ -83,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
@@ -106,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 << "\"/>"
@@ -443,7 +473,7 @@
attribute_map::value_type(attribute_name, std::string(first, last))
).second)
{
- detail::outerr(pos.file,pos.line)
+ detail::outwarn(pos.file,pos.line)
<< "Repeated attribute: " << attribute_name << ".\n";
}
}
@@ -569,19 +599,17 @@
void template_body_action::operator()(iterator first, iterator last) const
{
- BOOST_ASSERT(actions.template_info.size());
- if (actions.templates.find_top_scope(actions.template_info[0]))
+ if (!actions.templates.add(
+ template_symbol(actions.template_identifier, actions.template_info,
+ std::string(first, last), first.get_position())))
{
boost::spirit::classic::file_position const pos = first.get_position();
detail::outerr(pos.file,pos.line)
- << "Template Redefinition: " << actions.template_info[0] << std::endl;
+ << "Template Redefinition: " << actions.template_identifier << std::endl;
++actions.error_count;
}
- actions.template_info.push_back(std::string(first, last));
- actions.templates.add(
- actions.template_info[0]
- , template_symbol(actions.template_info, first.get_position()));
+ actions.template_identifier.clear();
actions.template_info.clear();
}
@@ -638,8 +666,8 @@
}
bool break_arguments(
- std::vector<std::string>& template_info
- , std::vector<std::string> const& template_
+ std::vector<std::string>& args
+ , std::vector<std::string> const& params
, boost::spirit::classic::file_position const& pos
)
{
@@ -650,17 +678,16 @@
// then use whitespace to separate them
// (2 = template name + argument).
- if (qbk_version_n < 105 || template_info.size() == 2)
+ if (qbk_version_n < 105 || args.size() == 1)
{
- // template_.size() - 1 because template_ also includes the body.
- while (template_info.size() < template_.size()-1 )
+ while (args.size() < params.size() )
{
// Try to break the last argument at the first space found
- // and push it into the back of template_info. Do this
+ // and push it into the back of args. Do this
// recursively until we have all the expected number of
// arguments, or if there are no more spaces left.
- std::string& str = template_info.back();
+ std::string& str = args.back();
std::string::size_type l_pos = find_first_seperator(str);
if (l_pos == std::string::npos)
break;
@@ -670,17 +697,17 @@
break;
std::string second(str.begin()+r_pos, str.end());
str = first;
- template_info.push_back(second);
+ args.push_back(second);
}
}
- if (template_info.size() != template_.size()-1)
+ if (args.size() != params.size())
{
detail::outerr(pos.file, pos.line)
<< "Invalid number of arguments passed. Expecting: "
- << template_.size()-2
+ << params.size()
<< " argument(s), got: "
- << template_info.size()-1
+ << args.size()
<< " argument(s) instead."
<< std::endl;
return false;
@@ -690,59 +717,53 @@
std::pair<bool, std::vector<std::string>::const_iterator>
get_arguments(
- std::vector<std::string>& template_info
- , std::vector<std::string> const& template_
+ std::vector<std::string>& args
+ , std::vector<std::string> const& params
, template_scope const& scope
, boost::spirit::classic::file_position const& pos
, quickbook::actions& actions
)
{
- std::vector<std::string>::const_iterator arg = template_info.begin()+1;
- std::vector<std::string>::const_iterator tpl = template_.begin()+1;
+ std::vector<std::string>::const_iterator arg = args.begin();
+ std::vector<std::string>::const_iterator tpl = params.begin();
+ std::vector<std::string> empty_params;
+
// Store each of the argument passed in as local templates:
- while (arg != template_info.end())
+ while (arg != args.end())
{
- std::vector<std::string> tinfo;
- tinfo.push_back(*tpl);
- tinfo.push_back(*arg);
- template_symbol template_(tinfo, pos, &scope);
-
- if (actions.templates.find_top_scope(*tpl))
+ if (!actions.templates.add(
+ template_symbol(*tpl, empty_params, *arg, pos, &scope)))
{
detail::outerr(pos.file,pos.line)
<< "Duplicate Symbol Found" << std::endl;
++actions.error_count;
return std::make_pair(false, tpl);
}
- else
- {
- actions.templates.add(*tpl, template_);
- }
++arg; ++tpl;
}
return std::make_pair(true, tpl);
}
bool parse_template(
- std::string& body
+ std::string body
, std::string& result
+ , bool& is_block
, boost::spirit::classic::file_position const& template_pos
, quickbook::actions& actions
)
{
- simple_phrase_grammar<quickbook::actions> phrase_p(actions);
- block_grammar<quickbook::actions, true> block_p(actions);
-
// How do we know if we are to parse the template as a block or
// a phrase? We apply a simple heuristic: if the body starts with
// a newline, then we regard it as a block, otherwise, we parse
// it as a phrase.
+ body.reserve(body.size() + 2);
+
std::string::const_iterator iter = body.begin();
while (iter != body.end() && ((*iter == ' ') || (*iter == '\t')))
++iter; // skip spaces and tabs
- bool is_block = (iter != body.end()) && ((*iter == '\r') || (*iter == '\n'));
+ is_block = (iter != body.end()) && ((*iter == '\r') || (*iter == '\n'));
bool r = false;
if (actions.template_escape)
@@ -754,6 +775,8 @@
}
else if (!is_block)
{
+ simple_phrase_grammar<quickbook::actions> phrase_p(actions);
+
// do a phrase level parse
iterator first(body.begin(), body.end(), actions.filename.file_string().c_str());
first.set_position(template_pos);
@@ -763,6 +786,8 @@
}
else
{
+ block_grammar<quickbook::actions, true> block_p(actions);
+
// do a block level parse
// ensure that we have enough trailing newlines to eliminate
// the need to check for end of file in the grammar.
@@ -774,15 +799,29 @@
first.set_position(template_pos);
iterator last(body.end(), body.end());
r = boost::spirit::classic::parse(first, last, block_p).full;
+ actions.inside_paragraph();
actions.out.swap(result);
}
+
return r;
}
}
+ namespace detail
+ {
+ int callout_id = 0;
+ }
+
void do_template_action::operator()(iterator first, iterator) const
{
+ // Get the arguments and clear values stored in action.
+
+ std::vector<std::string> args;
+ std::string identifier;
+ std::swap(args, actions.template_info);
+ std::swap(identifier, actions.template_identifier);
boost::spirit::classic::file_position const pos = first.get_position();
+
++actions.template_depth;
if (actions.template_depth > actions.max_template_depth)
{
@@ -800,42 +839,75 @@
// arguments are expanded.
template_scope const& call_scope = actions.templates.top_scope();
- template_symbol const* symbol =
- actions.templates.find(actions.template_info[0]);
+ template_symbol const* symbol = actions.templates.find(identifier);
BOOST_ASSERT(symbol);
std::string result;
+ bool is_block;
actions.push(); // scope the actions' states
{
// Store the current section level so that we can ensure that
// [section] and [endsect] tags in the template are balanced.
actions.min_section_level = actions.section_level;
- template_symbol const* symbol =
- actions.templates.find(actions.template_info[0]);
- BOOST_ASSERT(symbol);
-
// Quickbook 1.4-: When expanding the tempalte continue to use the
// current scope (the dynamic scope).
// Quickbook 1.5+: Use the scope the template was defined in
// (the static scope).
if (qbk_version_n >= 105)
- actions.templates.set_parent_scope(*boost::get<2>(*symbol));
-
- std::vector<std::string> template_ = boost::get<0>(*symbol);
- boost::spirit::classic::file_position template_pos = boost::get<1>(*symbol);
-
- std::vector<std::string> template_info;
- std::swap(template_info, actions.template_info);
+ actions.templates.set_parent_scope(*symbol->parent);
///////////////////////////////////
- // Break the arguments
- if (!break_arguments(template_info, template_, pos))
+ // Initialise the arguments
+
+ if (!symbol->callout)
{
- actions.pop(); // restore the actions' states
- --actions.template_depth;
- ++actions.error_count;
- return;
+ // Break the arguments for a template
+
+ if (!break_arguments(args, symbol->params, pos))
+ {
+ actions.pop(); // restore the actions' states
+ --actions.template_depth;
+ ++actions.error_count;
+ return;
+ }
+ }
+ else
+ {
+ if (!args.empty())
+ {
+ detail::outerr(pos.file, pos.line)
+ << "Arguments for code snippet."
+ <<std::endl;
+ ++actions.error_count;
+
+ args.clear();
+ }
+
+ BOOST_ASSERT(symbol->params.size() % 2 == 0);
+ unsigned int size = symbol->params.size() / 2;
+
+ for(unsigned int i = 0; i < size; ++i)
+ {
+ std::string callout_id = actions.doc_id +
+ boost::lexical_cast<std::string>(detail::callout_id++);
+
+ std::string code;
+ code += "'''";
+ code += "<co id=\"" + callout_id + "co\" ";
+ code += "linkends=\"" + callout_id + "\" />";
+ code += "'''";
+
+ args.push_back(code);
+
+ code.clear();
+ code += "'''";
+ code += "<callout arearefs=\"" + callout_id + "co\" ";
+ code += "id=\"" + callout_id + "\">";
+ code += "'''";
+
+ args.push_back(code);
+ }
}
///////////////////////////////////
@@ -843,7 +915,7 @@
bool get_arg_result;
std::vector<std::string>::const_iterator tpl;
boost::tie(get_arg_result, tpl) =
- get_arguments(template_info, template_,
+ get_arguments(args, symbol->params,
call_scope, pos, actions);
if (!get_arg_result)
@@ -855,17 +927,15 @@
///////////////////////////////////
// parse the template body:
- std::string body;
- body.assign(tpl->begin(), tpl->end());
- body.reserve(body.size()+2); // reserve 2 more
- if (!parse_template(body, result, template_pos, actions))
+ if (!parse_template(symbol->body, result, is_block, symbol->position, actions))
{
boost::spirit::classic::file_position const pos = first.get_position();
detail::outerr(pos.file,pos.line)
- << "Expanding template:" << template_info[0] << std::endl
+ << "Expanding template:" << symbol->identifier << std::endl
+ << std::endl
<< "------------------begin------------------" << std::endl
- << body
+ << symbol->body
<< "------------------end--------------------" << std::endl
<< std::endl;
actions.pop(); // restore the actions' states
@@ -873,12 +943,12 @@
++actions.error_count;
return;
}
-
+
if (actions.section_level != actions.min_section_level)
{
boost::spirit::classic::file_position const pos = first.get_position();
detail::outerr(pos.file,pos.line)
- << "Mismatched sections in template " << template_info[0] << std::endl;
+ << "Mismatched sections in template " << identifier << std::endl;
actions.pop(); // restore the actions' states
--actions.template_depth;
++actions.error_count;
@@ -887,7 +957,13 @@
}
actions.pop(); // restore the actions' states
- actions.phrase << result; // print it!!!
+ if(is_block) {
+ actions.inside_paragraph();
+ actions.temp_para << result; // print it!!!
+ }
+ else {
+ actions.phrase << result; // print it!!!
+ }
--actions.template_depth;
}
@@ -1169,21 +1245,10 @@
code += *first;
}
- namespace detail
- {
- int callout_id = 0;
- }
-
void code_snippet_actions::callout(iterator first, iterator last)
{
- using detail::callout_id;
- code += "``'''";
- code += "<co id=\"";
- code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "co\" ";
- code += "linkends=\"";
- code += doc_id + boost::lexical_cast<std::string>(callout_id + callouts.size()) + "\" />";
- code += "'''``";
-
+ code += "``[[callout" + boost::lexical_cast<std::string>(callouts.size()) + "]]``";
+
callouts.push_back(std::string(first, last));
}
@@ -1210,7 +1275,8 @@
void code_snippet_actions::compile(iterator first, iterator last)
{
- using detail::callout_id;
+ std::vector<std::string> params;
+
if (!code.empty())
{
detail::unindent(code); // remove all indents
@@ -1223,31 +1289,32 @@
if(callouts.size() > 0)
{
+ std::vector<std::string> callout_items;
+
snippet += "'''<calloutlist>'''";
for (size_t i = 0; i < callouts.size(); ++i)
{
- snippet += "'''<callout arearefs=\"";
- snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "co\" ";
- snippet += "id=\"";
- snippet += doc_id + boost::lexical_cast<std::string>(callout_id + i) + "\">";
- snippet += "'''";
-
+ std::string callout_template = "[callout" + boost::lexical_cast<std::string>(i) + "]";
+ std::string calloutitem_template = "[calloutitem" + boost::lexical_cast<std::string>(i) + "]";
+
+ snippet += "[" + calloutitem_template + "]";
snippet += "'''<para>'''";
snippet += callouts[i];
snippet += "\n";
snippet += "'''</para>'''";
snippet += "'''</callout>'''";
+
+ params.push_back(callout_template);
+ params.push_back(calloutitem_template);
}
snippet += "'''</calloutlist>'''";
}
}
- std::vector<std::string> tinfo;
- tinfo.push_back(id);
- tinfo.push_back(snippet);
- storage.push_back(template_symbol(tinfo, first.get_position()));
+ template_symbol symbol(id, params, snippet, first.get_position());
+ symbol.callout = true;
+ storage.push_back(symbol);
- callout_id += callouts.size();
callouts.clear();
code.clear();
snippet.clear();
@@ -1326,18 +1393,14 @@
BOOST_FOREACH(template_symbol const& ts, storage)
{
- std::string tname = boost::get<0>(ts)[0];
- if (actions.templates.find_top_scope(tname))
+ std::string tname = ts.identifier;
+ if (!actions.templates.add(ts))
{
- boost::spirit::classic::file_position const pos = boost::get<1>(ts);
+ boost::spirit::classic::file_position const pos = ts.position;
detail::outerr(pos.file, pos.line)
<< "Template Redefinition: " << tname << std::endl;
++actions.error_count;
}
- else
- {
- actions.templates.add(tname, ts);
- }
}
}
@@ -1350,10 +1413,23 @@
std::swap(actions.filename, filein);
// save the doc info strings
- actions.doc_type.swap(doc_type);
- actions.doc_id.swap(doc_id);
- actions.doc_dirname.swap(doc_dirname);
- actions.doc_last_revision.swap(doc_last_revision);
+ if(qbk_version_n >= 106) {
+ doc_type = actions.doc_type;
+ doc_id = actions.doc_id;
+ doc_dirname = actions.doc_dirname;
+ doc_last_revision = actions.doc_last_revision;
+ }
+ else {
+ actions.doc_type.swap(doc_type);
+ actions.doc_id.swap(doc_id);
+ actions.doc_dirname.swap(doc_dirname);
+ actions.doc_last_revision.swap(doc_last_revision);
+ }
+
+ // save the version info
+ unsigned qbk_major_version_store = qbk_major_version;
+ unsigned qbk_minor_version_store = qbk_minor_version;
+ unsigned qbk_version_n_store = qbk_version_n;
// scope the macros
string_symbols macro = actions.macro;
@@ -1381,6 +1457,13 @@
actions.doc_id.swap(doc_id);
actions.doc_dirname.swap(doc_dirname);
actions.doc_last_revision.swap(doc_last_revision);
+
+ if(qbk_version_n >= 106 || qbk_version_n_store >= 106)
+ {
+ qbk_major_version = qbk_major_version_store;
+ qbk_minor_version = qbk_minor_version_store;
+ qbk_version_n = qbk_version_n_store;
+ }
// restore the macros
actions.macro = macro;
@@ -1391,8 +1474,12 @@
void xml_author::operator()(std::pair<std::string, std::string> const& author) const
{
out << " <author>\n"
- << " <firstname>" << author.first << "</firstname>\n"
- << " <surname>" << author.second << "</surname>\n"
+ << " <firstname>";
+ detail::print_string(author.first, out.get());
+ out << "</firstname>\n"
+ << " <surname>";
+ detail::print_string(author.second, out.get());
+ out << "</surname>\n"
<< " </author>\n";
}
@@ -1405,7 +1492,9 @@
, copyright.first.end()
, xml_year(out));
- out << " <holder>" << copyright.second << "</holder>\n"
+ out << " <holder>";
+ detail::print_string(copyright.second, out.get());
+ out << "</holder>\n"
<< " </copyright>\n"
<< "\n"
;
@@ -1452,7 +1541,7 @@
return;
}
- if (qbk_major_version == 0)
+ if (qbk_major_version == -1)
{
// hard code quickbook version to v1.1
qbk_major_version = 1;
@@ -1464,7 +1553,25 @@
}
else
{
- qbk_version_n = (qbk_major_version * 100) + qbk_minor_version;
+ qbk_version_n = ((unsigned) qbk_major_version * 100) +
+ (unsigned) qbk_minor_version;
+ }
+
+ if (qbk_version_n == 106)
+ {
+ detail::outwarn(actions.filename.file_string(),1)
+ << "Quickbook 1.6 is still under development and is "
+ "likely to change in the future." << std::endl;
+ }
+ else if(qbk_version_n < 100 || qbk_version_n > 106)
+ {
+ detail::outerr(actions.filename.file_string(),1)
+ << "Unknown version of quickbook: quickbook "
+ << qbk_major_version
+ << "."
+ << qbk_minor_version
+ << std::endl;
+ ++actions.error_count;
}
out << "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
@@ -1473,19 +1580,27 @@
<< " PUBLIC \"-//Boost//DTD BoostBook XML V1.0//EN\"\n"
<< " \"http://www.boost.org/tools/boostbook/dtd/boostbook.dtd\">\n"
<< '<' << actions.doc_type << "\n"
- << " id=\"" << actions.doc_id << "\"\n";
+ << " id=\"";
+ detail::print_string(actions.doc_id, out.get());
+ out << "\"\n";
if(actions.doc_type == "library")
{
- out << " name=\"" << actions.doc_title << "\"\n";
+ out << " name=\"";
+ detail::print_string(actions.doc_title, out.get());
+ out << "\"\n";
}
if(!actions.doc_dirname.empty())
{
- out << " dirname=\"" << actions.doc_dirname << "\"\n";
+ out << " dirname=\"";
+ detail::print_string(actions.doc_dirname, out.get());
+ out << "\"\n";
}
- out << " last-revision=\"" << actions.doc_last_revision << "\" \n"
+ out << " last-revision=\"";
+ detail::print_string(actions.doc_last_revision, out.get());
+ out << "\" \n"
<< " xmlns:xi=\"http://www.w3.org/2001/XInclude\">\n";
if(actions.doc_type == "library") {
@@ -1515,9 +1630,12 @@
{
if (!actions.doc_title.empty())
{
- out<< " <title>" << actions.doc_title;
- if (!actions.doc_version.empty())
- out << ' ' << actions.doc_version;
+ out<< " <title>";
+ detail::print_string(actions.doc_title, out.get());
+ if (!actions.doc_version.empty()) {
+ out << ' ';
+ detail::print_string(actions.doc_version, out.get());
+ }
out<< "</title>\n\n\n";
}
}
@@ -1548,35 +1666,68 @@
if (qbk_version_n < 103)
{
- // version < 1.3 compatibility
- actions.doc_license = actions.doc_license_1_1;
- actions.doc_purpose = actions.doc_purpose_1_1;
- }
-
- if (!actions.doc_license.empty())
- {
- out << " <legalnotice>\n"
- << " <para>\n"
- << " " << actions.doc_license << "\n"
- << " </para>\n"
- << " </legalnotice>\n"
- << "\n"
- ;
+ if (!actions.doc_license_1_1.empty())
+ {
+ out << " <legalnotice>\n"
+ << " <para>\n"
+ << " ";
+ detail::print_string(actions.doc_license_1_1, out.get());
+ out << "\n"
+ << " </para>\n"
+ << " </legalnotice>\n"
+ << "\n"
+ ;
+ }
}
-
- if (!actions.doc_purpose.empty())
+ else
{
- if (actions.doc_type == "library")
+ if (!actions.doc_license.empty())
{
- out << " <" << actions.doc_type << "purpose>\n"
- << " " << actions.doc_purpose
- << " </" << actions.doc_type << "purpose>\n"
+ out << " <legalnotice>\n"
+ << " <para>\n"
+ << " " << actions.doc_license << "\n"
+ << " </para>\n"
+ << " </legalnotice>\n"
<< "\n"
;
}
- else
+ }
+
+ if (qbk_version_n < 103)
+ {
+ if (!actions.doc_purpose_1_1.empty())
+ {
+ if (actions.doc_type == "library")
+ {
+ out << " <" << actions.doc_type << "purpose>\n"
+ << " ";
+ detail::print_string(actions.doc_purpose_1_1, out.get());
+ out << " </" << actions.doc_type << "purpose>\n"
+ << "\n"
+ ;
+ }
+ else
+ {
+ invalid_attributes.push_back("purpose");
+ }
+ }
+ }
+ else
+ {
+ if (!actions.doc_purpose.empty())
{
- invalid_attributes.push_back("purpose");
+ if (actions.doc_type == "library")
+ {
+ out << " <" << actions.doc_type << "purpose>\n"
+ << " " << actions.doc_purpose
+ << " </" << actions.doc_type << "purpose>\n"
+ << "\n"
+ ;
+ }
+ else
+ {
+ invalid_attributes.push_back("purpose");
+ }
}
}
@@ -1589,9 +1740,9 @@
end = actions.doc_categories.end();
it != end; ++it)
{
- out << " <" << actions.doc_type << "category name=\"category:"
- << *it
- << "\"></" << actions.doc_type << "category>\n"
+ out << " <" << actions.doc_type << "category name=\"category:";
+ detail::print_string(*it, out.get());
+ out << "\"></" << actions.doc_type << "category>\n"
<< "\n"
;
}
@@ -1622,5 +1773,11 @@
{
phrase.swap(out);
}
-}
+ void copy_stream_action::operator()(iterator first, iterator last) const
+ {
+ std::string str;
+ phrase.swap(str);
+ out << str;
+ }
+}
Modified: branches/release/tools/quickbook/detail/actions.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions.hpp (original)
+++ branches/release/tools/quickbook/detail/actions.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -85,6 +85,30 @@
std::string post;
};
+ struct implicit_paragraph_action
+ {
+ // implicit paragraphs
+ // doesn't output the paragraph if it's only whitespace.
+
+ implicit_paragraph_action(
+ collector& out,
+ collector& phrase,
+ std::string const& pre,
+ std::string const& post)
+ : out(out)
+ , phrase(phrase)
+ , pre(pre)
+ , post(post) {}
+
+ void operator()() const;
+ void operator()(iterator first, iterator last) const { (*this)(); }
+
+ collector& out;
+ collector& phrase;
+ std::string pre;
+ std::string post;
+ };
+
struct header_action
{
// Handles paragraph, h1, h2, h3, h4, h5, h6,
@@ -383,14 +407,17 @@
attribute_action(
attribute_map& attributes
- , std::string& attribute_name)
+ , std::string& attribute_name
+ , int& error_count)
: attributes(attributes)
- , attribute_name(attribute_name) {}
+ , attribute_name(attribute_name)
+ , error_count(error_count) {}
void operator()(iterator first, iterator last) const;
attribute_map& attributes;
std::string& attribute_name;
+ int& error_count;
};
struct image_action
@@ -832,6 +859,17 @@
std::string& out;
collector& phrase;
};
+
+ struct copy_stream_action
+ {
+ copy_stream_action(collector& out, collector& phrase)
+ : out(out) , phrase(phrase) {}
+
+ void operator()(iterator first, iterator last) const;
+
+ collector& out;
+ collector& phrase;
+ };
}
#ifdef BOOST_MSVC
Modified: branches/release/tools/quickbook/detail/actions_class.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions_class.cpp (original)
+++ branches/release/tools/quickbook/detail/actions_class.cpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -60,6 +60,7 @@
, macro_id()
, list_marks()
, list_indent(-1)
+ , template_identifier()
, template_info()
, template_depth(0)
, template_escape(false)
@@ -78,8 +79,8 @@
, code(out, phrase, syntax_p)
, code_block(phrase, phrase, syntax_p)
, inline_code(phrase, syntax_p)
- , paragraph(out, phrase, paragraph_pre, paragraph_post)
, inside_paragraph(temp_para, phrase, paragraph_pre, paragraph_post)
+ , write_paragraphs(out, temp_para)
, h(out, phrase, doc_id, section_id, qualified_section_id, section_level)
, h1(out, phrase, doc_id, section_id, qualified_section_id, h1_pre, h1_post)
, h2(out, phrase, doc_id, section_id, qualified_section_id, h2_pre, h2_post)
@@ -99,7 +100,7 @@
, plain_char(phrase)
, raw_char(phrase)
, escape_unicode(phrase)
- , attribute(attributes, attribute_name)
+ , attribute(attributes, attribute_name, error_count)
, image(phrase, attributes, image_fileref)
, cond_phrase_pre(phrase, conditions, macro)
, cond_phrase_post(phrase, conditions, macro)
Modified: branches/release/tools/quickbook/detail/actions_class.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/actions_class.hpp (original)
+++ branches/release/tools/quickbook/detail/actions_class.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -89,6 +89,7 @@
std::stack<mark_type> list_marks;
int list_indent;
std::vector<bool> conditions;
+ std::string template_identifier;
string_list template_info;
int template_depth;
bool template_escape;
@@ -113,8 +114,8 @@
code_action code;
code_action code_block;
inline_code_action inline_code;
- phrase_action paragraph;
- phrase_action inside_paragraph;
+ implicit_paragraph_action inside_paragraph;
+ copy_stream_action write_paragraphs;
generic_header_action h;
header_action h1, h2, h3, h4, h5, h6;
markup_action hr;
Modified: branches/release/tools/quickbook/detail/quickbook.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/quickbook.cpp (original)
+++ branches/release/tools/quickbook/detail/quickbook.cpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -38,8 +38,8 @@
tm* current_time; // the current time
tm* current_gm_time; // the current UTC time
bool debug_mode; // for quickbook developers only
- unsigned qbk_major_version = 0;
- unsigned qbk_minor_version = 0;
+ int qbk_major_version = -1;
+ int qbk_minor_version = -1;
unsigned qbk_version_n = 0; // qbk_major_version * 100 + qbk_minor_version
bool ms_errors = false; // output errors/warnings as if for VS
std::vector<std::string> include_path;
Modified: branches/release/tools/quickbook/detail/quickbook.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/quickbook.hpp (original)
+++ branches/release/tools/quickbook/detail/quickbook.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -14,8 +14,8 @@
namespace quickbook
{
- extern unsigned qbk_major_version;
- extern unsigned qbk_minor_version;
+ extern int qbk_major_version;
+ extern int qbk_minor_version;
extern unsigned qbk_version_n; // qbk_major_version * 100 + qbk_minor_version
struct quickbook_range {
Modified: branches/release/tools/quickbook/detail/template_stack.cpp
==============================================================================
--- branches/release/tools/quickbook/detail/template_stack.cpp (original)
+++ branches/release/tools/quickbook/detail/template_stack.cpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -49,13 +49,22 @@
}
// TODO: Should symbols defined by '[import]' use the current scope?
- void template_stack::add(std::string const& symbol, template_symbol const& ts)
+ bool template_stack::add(template_symbol const& ts)
{
BOOST_ASSERT(!scopes.empty());
- boost::spirit::classic::add(scopes.front().symbols, symbol.c_str(),
- boost::get<2>(ts) ? ts :
- template_symbol(boost::get<0>(ts), boost::get<1>(ts), &top_scope()));
- }
+
+ if (this->find_top_scope(ts.identifier)) {
+ return false;
+ }
+
+ template_symbol symbol(ts);
+ if(!ts.parent) symbol.parent = &top_scope();
+
+ boost::spirit::classic::add(scopes.front().symbols, ts.identifier.c_str(),
+ symbol);
+
+ return true;
+ }
void template_stack::push()
{
Modified: branches/release/tools/quickbook/detail/template_stack.hpp
==============================================================================
--- branches/release/tools/quickbook/detail/template_stack.hpp (original)
+++ branches/release/tools/quickbook/detail/template_stack.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -23,23 +23,32 @@
{
struct template_scope;
- // template symbols with N arguments are stored as follows:
- //
- // vector<std::string>
- // 0: template name
- // 1: template param name[0]
- // 2: template param name[1]
- // ...
- // N: template param name[N-1]
- // N+1: template body
- // file position
- // template scope (only used for 1.5+, 1.4- uses the dynamic scope)
-
- typedef boost::tuple<
- std::vector<std::string>
- , boost::spirit::classic::file_position
- , template_scope const*>
- template_symbol;
+ struct template_symbol
+ {
+ template_symbol(
+ std::string const& identifier,
+ std::vector<std::string> const& params,
+ std::string const& body,
+ boost::spirit::classic::file_position const& position,
+ template_scope const* parent = 0)
+ : identifier(identifier)
+ , callout(false)
+ , params(params)
+ , body(body)
+ , position(position)
+ , parent(parent) {}
+
+ std::string identifier;
+ bool callout;
+ std::vector<std::string> params;
+ std::string body;
+ boost::spirit::classic::file_position position;
+
+ // This is only used for quickbook 1.5+, 1.4 uses the dynamic scope.
+ // TODO: I should probably call this something like lexical_parent
+ // or static_parent for clarity.
+ template_scope const* parent;
+ };
typedef boost::spirit::classic::symbols<template_symbol> template_symbols;
@@ -101,7 +110,7 @@
template_scope const& top_scope() const;
// Add the given template symbol to the current scope.
// If it doesn't have a scope, sets the symbol's scope to the current scope.
- void add(std::string const& symbol, template_symbol const& ts);
+ bool add(template_symbol const&);
void push();
void pop();
Modified: branches/release/tools/quickbook/doc/quickbook.qbk
==============================================================================
--- branches/release/tools/quickbook/doc/quickbook.qbk (original)
+++ branches/release/tools/quickbook/doc/quickbook.qbk 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -191,16 +191,34 @@
[h3 Version 1.5.2 - Boost 1.44.0]
-* Generate more valid boostbook (still invalid in a few places).
-* Warn about invalid doc_info members.
-* Support multiple categories in library doc_info.
* Use the cygwin 1.7 API for better path handling.
-* Fix some corner cases for paragraph detection:
+* Improved boostbook generation:
+ * XML encode the documentation info correctly.
+ * Avoid generating empty paragraphs.
+ * No longer wraps block templates in paragraphs.
+ * Doesn't generate invalid doc_info members for docbook document types,
+ warns if you use any.
+ * Fixes some other causes of invalid boostbook, although it still
+ generates invalid boostbook in places.
+* Improved grammar:
+ * Supports multiple categories in library doc_info.
+ * No longer requires commas between authors in docinfo.
+ * Allows empty document bodies.
* A line containing only a comment is no longer interpreted as a
paragraph break.
* If a line starts with a comment, interpret it as a paragraph even if it's
followed by whitespace or a list character.
- * Don't treat 4+ consecutive blank lines as multiple paragraph breaks.
+ * Doesn't treat several consecutive blank lines as multiple paragraph breaks.
+* Fixes duplicate image attribute detection.
+* Fixes using code snippets more than once.
+* Early work on quickbook 1.6, available using the `[quickbook 1.6]` version switch,
+ but liable to change in future versions.
+ * When automatically generating ids for headers, use the quickbook
+ source, rather than the generated docbook.
+ * Fix id generation in included files. It wasn't correctly using the
+ main document's documentation id.
+ * Correctly restore the quickbook version switch after including a file
+ with a different version.
[endsect]
@@ -757,7 +775,7 @@
[copyright 2000 2002 2003 Joe Blow, Jane Doe]
[purpose The document's reason for being]
[category The document's category]
- [authors [Blow, Joe], [Doe, Jane]]
+ [authors [Blow, Joe] [Doe, Jane]]
[license The document's license]
[source-mode source-type]
]
Modified: branches/release/tools/quickbook/doc_info.hpp
==============================================================================
--- branches/release/tools/quickbook/doc_info.hpp (original)
+++ branches/release/tools/quickbook/doc_info.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -121,8 +121,7 @@
;
doc_author =
- space
- >> '[' >> space
+ '[' >> space
>> (*(anychar_p - ',')) [assign_a(name.second)] // surname
>> ',' >> space
>> (*(anychar_p - ']')) [assign_a(name.first)] // firstname
@@ -130,10 +129,13 @@
;
doc_authors =
- "authors" >> hard_space
- >> doc_author [push_back_a(actions.doc_authors, name)]
- >> *( ','
- >> doc_author [push_back_a(actions.doc_authors, name)]
+ "authors"
+ >> hard_space
+ >> doc_author [push_back_a(actions.doc_authors, name)]
+ >> space
+ >> *( !(ch_p(',') >> space)
+ >> doc_author [push_back_a(actions.doc_authors, name)]
+ >> space
)
;
Modified: branches/release/tools/quickbook/phrase.hpp
==============================================================================
--- branches/release/tools/quickbook/phrase.hpp (original)
+++ branches/release/tools/quickbook/phrase.hpp 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -131,14 +131,16 @@
( (
(eps_p(punct_p)
>> actions.templates.scope
- ) [push_back_a(actions.template_info)]
+ ) [assign_a(actions.template_identifier)]
+ [clear_a(actions.template_info)]
>> !template_args
) | (
(actions.templates.scope
- >> eps_p
- ) [push_back_a(actions.template_info)]
- >> !(hard_space
- >> template_args)
+ >> eps_p(hard_space)
+ ) [assign_a(actions.template_identifier)]
+ [clear_a(actions.template_info)]
+ >> space
+ >> !template_args
) )
>> eps_p(']')
;
Modified: branches/release/tools/quickbook/test/Jamfile.v2
==============================================================================
--- branches/release/tools/quickbook/test/Jamfile.v2 (original)
+++ branches/release/tools/quickbook/test/Jamfile.v2 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -24,12 +24,19 @@
[ quickbook-test templates_1_4 ]
[ quickbook-test templates_1_5 ]
[ quickbook-test template-section ]
+ [ quickbook-test mismatched-brackets-1 ]
+ [ quickbook-test mismatched-brackets-2 ]
+ [ quickbook-fail-test mismatched-brackets-3 ]
#[ quickbook-test xinclude ]
[ quickbook-test import ]
[ quickbook-test include_1_5 ]
+ [ quickbook-test include_1_6 ]
+ [ quickbook-test include_1_6-2 ]
[ 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 ]
@@ -37,8 +44,12 @@
[ quickbook-test cond_phrase ]
[ quickbook-test doc-info-1 ]
[ quickbook-test doc-info-2 ]
+ [ quickbook-test doc-info-3 ]
+ [ quickbook-test doc-info-4 ]
[ quickbook-test callouts ]
[ quickbook-test simple_markup ]
+ [ quickbook-test xml-escape_1_2 ]
+ [ quickbook-test xml-escape_1_5 ]
[ quickbook-test blocks ]
[ quickbook-fail-test fail-include ]
[ quickbook-fail-test fail-import ]
@@ -54,6 +65,9 @@
[ quickbook-fail-test fail-template-section-1 ]
[ quickbook-fail-test fail-template-section-2 ]
[ quickbook-fail-test fail-template-section-3 ]
+ [ quickbook-fail-test fail-unknown-quickbook-1 ]
+ [ quickbook-fail-test fail-unknown-quickbook-2 ]
+ [ quickbook-fail-test fail-unknown-quickbook-3 ]
[ quickbook-test utf-8 ]
[ quickbook-test utf-8-bom ]
[ quickbook-test unicode-escape ]
Modified: branches/release/tools/quickbook/test/callouts.gold
==============================================================================
--- branches/release/tools/quickbook/test/callouts.gold (original)
+++ branches/release/tools/quickbook/test/callouts.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -9,67 +9,83 @@
Example 1:
</para>
<para>
- <para>
- Now we can define a function that simulates an ordinary six-sided die.
- </para>
- <para>
-
+ Now we can define a function that simulates an ordinary six-sided die.
+ </para>
+ <para>
+
<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
<phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="identifier">dist</phrase><phrase role="special">(</phrase><phrase role="number">1</phrase><phrase role="special">,</phrase> <phrase role="number">6</phrase><phrase role="special">);</phrase> <!--quickbook-escape-prefix--><co id="callout_tests0co" linkends="callout_tests0" /><!--quickbook-escape-postfix-->
<phrase role="special">}</phrase>
</programlisting>
- </para>
- <para>
- <calloutlist><callout arearefs="callout_tests0co" id="callout_tests0"><para> create a uniform_int distribution </para></callout></calloutlist>
- </para>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="callout_tests0co" id="callout_tests0"><para> create a uniform_int distribution </para></callout></calloutlist>
</para>
<para>
Example 2:
</para>
<para>
- <para>
-
+
<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
<!--quickbook-escape-prefix--><co id="callout_tests1co" linkends="callout_tests1" /><!--quickbook-escape-postfix--><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
- <para>
- <calloutlist><callout arearefs="callout_tests1co" id="callout_tests1"><para>
- </para>
- <important>
- <para>
- test
- </para>
- </important>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="callout_tests1co" id="callout_tests1"><para>
+ </para>
+ <important>
<para>
- </para></callout></calloutlist>
+ test
</para>
+ </important>
+ <para>
+ </para></callout></calloutlist>
</para>
<para>
Example 3:
</para>
<para>
- <para>
-
+
<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
<!--quickbook-escape-prefix--><co id="callout_tests2co" linkends="callout_tests2" /><!--quickbook-escape-postfix--><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="callout_tests2co" id="callout_tests2"><para>
+ </para>
+ <important>
<para>
- <calloutlist><callout arearefs="callout_tests2co" id="callout_tests2"><para>
+ test
</para>
- <important>
- <para>
- test
- </para>
- </important>
+ </important>
+ <para>
+ </para></callout></calloutlist>
+ </para>
+ <para>
+ Example 3 (again!):
+ </para>
+ <para>
+
+<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">roll_die</phrase><phrase role="special">()</phrase> <phrase role="special">{</phrase>
+ <!--quickbook-escape-prefix--><co id="callout_tests3co" linkends="callout_tests3" /><!--quickbook-escape-postfix--><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">variate_generator</phrase><phrase role="special"><</phrase><phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">mt19937</phrase><phrase role="special">&,</phrase> <phrase role="identifier">boost</phrase><phrase role="special">::</phrase><phrase role="identifier">uniform_int</phrase><phrase role="special"><></phrase> <phrase role="special">></phrase> <phrase role="identifier">die</phrase><phrase role="special">(</phrase><phrase role="identifier">gen</phrase><phrase role="special">,</phrase> <phrase role="identifier">dist</phrase><phrase role="special">);</phrase>
+<phrase role="special">}</phrase>
+
+</programlisting>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="callout_tests3co" id="callout_tests3"><para>
+ </para>
+ <important>
<para>
- </para></callout></calloutlist>
+ test
</para>
+ </important>
+ <para>
+ </para></callout></calloutlist>
</para>
</article>
Modified: branches/release/tools/quickbook/test/callouts.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/callouts.quickbook (original)
+++ branches/release/tools/quickbook/test/callouts.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -15,3 +15,7 @@
Example 3:
[example3]
+
+Example 3 (again!):
+
+[example3]
Modified: branches/release/tools/quickbook/test/code-block-teletype.gold
==============================================================================
--- branches/release/tools/quickbook/test/code-block-teletype.gold (original)
+++ branches/release/tools/quickbook/test/code-block-teletype.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -5,8 +5,6 @@
<title>Code Block Teletype 1</title>
<articleinfo>
</articleinfo>
- <para>
- </para>
<section id="code_block_teletype_1.a_code_block">
<title><link linkend="code_block_teletype_1.a_code_block">A code block</link></title>
Modified: branches/release/tools/quickbook/test/doc-info-1.gold
==============================================================================
--- branches/release/tools/quickbook/test/doc-info-1.gold (original)
+++ branches/release/tools/quickbook/test/doc-info-1.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -4,8 +4,13 @@
xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Document Information 1</title>
<articleinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
</articleinfo>
- <para>
- The body is largely irrelevant.
- </para>
</article>
Modified: branches/release/tools/quickbook/test/doc-info-1.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/doc-info-1.quickbook (original)
+++ branches/release/tools/quickbook/test/doc-info-1.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -1,9 +1,8 @@
[article Document Information 1
[quickbook 1.5]
+[authors [Blow, Joe], [Doe, Jane]]
[source-mode teletype]
[purpose Inline code test: `1 + 2`]
[category tests]
[category irrelevance]
-]
-
-The body is largely irrelevant.
\ No newline at end of file
+]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/doc-info-2.gold
==============================================================================
--- branches/release/tools/quickbook/test/doc-info-2.gold (original)
+++ branches/release/tools/quickbook/test/doc-info-2.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -3,13 +3,18 @@
<library id="document_information_1" name="Document Information 1" dirname="document_information_1"
last-revision="DEBUG MODE Date: 2000/12/20 12:00:00 $" xmlns:xi="http://www.w3.org/2001/XInclude">
<libraryinfo>
+ <authorgroup>
+ <author>
+ <firstname>Joe</firstname> <surname>Blow</surname>
+ </author>
+ <author>
+ <firstname>Jane</firstname> <surname>Doe</surname>
+ </author>
+ </authorgroup>
<librarypurpose>
Inline code test: <code>1 + 2</code>
</librarypurpose>
<librarycategory name="category:tests"></librarycategory> <librarycategory name="category:irrelevance"></librarycategory>
</libraryinfo>
<title>Document Information 1</title>
- <para>
- The body is largely irrelevant.
- </para>
</library>
Modified: branches/release/tools/quickbook/test/doc-info-2.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/doc-info-2.quickbook (original)
+++ branches/release/tools/quickbook/test/doc-info-2.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -1,9 +1,10 @@
[library Document Information 1
[quickbook 1.5]
+[authors [Blow, Joe] [Doe, Jane]]
[source-mode teletype]
[purpose Inline code test: `1 + 2`]
[category tests]
[category irrelevance]
]
-The body is largely irrelevant.
\ No newline at end of file
+[/ Some comment]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/image_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/image_1_5.gold (original)
+++ branches/release/tools/quickbook/test/image_1_5.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -56,4 +56,11 @@
</textobject>
</inlinemediaobject>
</para>
+ <para>
+ <inlinemediaobject><imageobject><imagedata fileref="test.gif" height="10cm" width="10cm"></imagedata></imageobject>
+ <textobject>
+ <phrase>test</phrase>
+ </textobject>
+ </inlinemediaobject>
+ </para>
</article>
Modified: branches/release/tools/quickbook/test/image_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/image_1_5.quickbook (original)
+++ branches/release/tools/quickbook/test/image_1_5.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -13,4 +13,7 @@
[$ [/comment] test.gif ]
[$ [/comment] test.gif [/comment] ]
-[$ [/comment] test.gif [/comment] [alt comment] ]
\ No newline at end of file
+[$ [/comment] test.gif [/comment] [alt comment] ]
+
+[/ This should warn about repeated attribute and then ignore it. ]
+[$test.gif [width 10cm] [height 10cm] [width 20cm]]
Modified: branches/release/tools/quickbook/test/import.gold
==============================================================================
--- branches/release/tools/quickbook/test/import.gold (original)
+++ branches/release/tools/quickbook/test/import.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -5,99 +5,93 @@
<articleinfo>
</articleinfo>
<para>
- <para>
- This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
- </para>
- <para>
- This description can have paragraphs...
- </para>
- <itemizedlist>
- <listitem>
- <simpara>
- lists
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- etc.
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- And any quickbook block markup.
- </para>
- <para>
-
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="comment">// return 'em, foo man!
</phrase> <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
</para>
<para>
- <para>
- This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
- function.
- </para>
- <para>
- This description can have paragraphs...
- </para>
- <itemizedlist>
- <listitem>
- <simpara>
- lists
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- etc.
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- And any quickbook block markup.
- </para>
- <para>
-
+ This is the Python <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
+ function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+
<programlisting><phrase role="keyword">def</phrase> <phrase role="identifier">foo</phrase><phrase role="special">():</phrase>
<phrase role="comment"># return 'em, foo man!
</phrase> <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase>
</programlisting>
- </para>
</para>
<para>
- <para>
- This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
- </para>
- <para>
- This description can have paragraphs...
- </para>
- <itemizedlist>
- <listitem>
- <simpara>
- lists
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- etc.
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- And any quickbook block markup.
- </para>
- <para>
-
+ This is the C <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+
<programlisting><phrase role="keyword">char</phrase><phrase role="special">*</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="comment">// return 'em, foo man!
</phrase> <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
</para>
</article>
Modified: branches/release/tools/quickbook/test/include_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/include_1_5.quickbook (original)
+++ branches/release/tools/quickbook/test/include_1_5.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -5,4 +5,6 @@
[include include-sub.quickbook]
[include include-sub2.quickbook]
-[include:foo include-sub2.quickbook]
\ No newline at end of file
+[include:foo include-sub2.quickbook]
+[include empty.quickbook]
+
Modified: branches/release/tools/quickbook/test/quickbook-manual.gold
==============================================================================
--- branches/release/tools/quickbook/test/quickbook-manual.gold (original)
+++ branches/release/tools/quickbook/test/quickbook-manual.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -1541,8 +1541,6 @@
highlighted according to the current <link linkend="quickbook.syntax.phrase.source_mode">Source
Mode</link>:
</para>
- <para>
- </para>
<programlisting><phrase role="preprocessor">#include</phrase> <phrase role="special"><</phrase><phrase role="identifier">iostream</phrase><phrase role="special">></phrase>
@@ -1553,8 +1551,6 @@
<phrase role="keyword">return</phrase> <phrase role="number">0</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
- <para>
- </para>
<programlisting><phrase role="keyword">import</phrase> <phrase role="identifier">cgi</phrase>
@@ -1564,8 +1560,6 @@
<phrase role="keyword">return</phrase> <phrase role="identifier">cgi</phrase><phrase role="special">.</phrase><phrase role="identifier">escape</phrase><phrase role="special">(</phrase><phrase role="identifier">text</phrase><phrase role="special">)</phrase>
</programlisting>
<para>
- </para>
- <para>
Macros that are already defined are expanded in source code. Example:
</para>
@@ -2066,12 +2060,10 @@
Which will expand to:
</para>
<para>
- <para>
- Hi, my name is James Bond. I am 39 years old. I am a Spy.
- </para>
- <para>
- Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
- </para>
+ Hi, my name is James Bond. I am 39 years old. I am a Spy.
+ </para>
+ <para>
+ Hi, my name is Santa Clause. I am 87 years old. I am a Big Red Fatso.
</para>
<caution>
<para>
@@ -2695,52 +2687,48 @@
And the result is:
</para>
<para>
- <para>
- This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis>
- function.
- </para>
- <para>
- This description can have paragraphs...
- </para>
- <itemizedlist>
- <listitem>
- <simpara>
- lists
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- etc.
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- And any quickbook block markup.
- </para>
- <para>
-
+ This is the <emphasis role="bold"><emphasis>foo</emphasis></emphasis> function.
+ </para>
+ <para>
+ This description can have paragraphs...
+ </para>
+ <itemizedlist>
+ <listitem>
+ <simpara>
+ lists
+ </simpara>
+ </listitem>
+ <listitem>
+ <simpara>
+ etc.
+ </simpara>
+ </listitem>
+ </itemizedlist>
+ <para>
+ And any quickbook block markup.
+ </para>
+ <para>
+
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="comment">// return 'em, foo man!
</phrase> <phrase role="keyword">return</phrase> <phrase role="string">"foo"</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
- <para>
- This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis>
- function
- </para>
- <para>
-
+ </para>
+ <para>
+ This is the <emphasis role="bold"><emphasis>bar</emphasis></emphasis> function
+ </para>
+ <para>
+
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">bar</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="comment">// return 'em, bar man!
</phrase> <phrase role="keyword">return</phrase> <phrase role="string">"bar"</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase></programlisting>
- </para>
- <para>
- Some trailing text here
- </para>
+ </para>
+ <para>
+ Some trailing text here
</para>
<anchor id="quickbook.syntax.block.import.code_snippet_markup"/>
<bridgehead renderas="sect5">
@@ -2804,18 +2792,16 @@
for details. Example:
</para>
<para>
- <para>
-
+
<programlisting><phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">string</phrase> <phrase role="identifier">foo_bar</phrase><phrase role="special">()</phrase> <!--quickbook-escape-prefix--><co id="quickbook0co" linkends="quickbook0" /><!--quickbook-escape-postfix-->
<phrase role="special">{</phrase>
<phrase role="keyword">return</phrase> <phrase role="string">"foo-bar"</phrase><phrase role="special">;</phrase> <!--quickbook-escape-prefix--><co id="quickbook1co" linkends="quickbook1" /><!--quickbook-escape-postfix-->
<phrase role="special">}</phrase>
</programlisting>
- </para>
- <para>
- <calloutlist><callout arearefs="quickbook0co" id="quickbook0"><para> The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
- for details</ulink> </para></callout><callout arearefs="quickbook1co" id="quickbook1"><para> return 'em, foo-bar man! </para></callout></calloutlist>
- </para>
+ </para>
+ <para>
+ <calloutlist><callout arearefs="quickbook0co" id="quickbook0"><para> The <emphasis>Mythical</emphasis> FooBar. See <ulink url="http://en.wikipedia.org/wiki/Foobar">Foobar
+ for details</ulink> </para></callout><callout arearefs="quickbook1co" id="quickbook1"><para> return 'em, foo-bar man! </para></callout></calloutlist>
</para>
<para>
Checkout <ulink url="../../test/stub.cpp">stub.cpp</ulink> to see the actual
@@ -2840,8 +2826,6 @@
</para>
<section id="quickbook.install.windows">
<title><link linkend="quickbook.install.windows"> Windows 2000, XP, 2003, Vista</link></title>
- <para>
- </para>
<blockquote>
<para>
<emphasis>Section contributed by Julio M. Merino Vidal</emphasis>
@@ -3739,13 +3723,11 @@
</para>
</entry>
<entry>
- <para>
-
+
<programlisting><!--quickbook-escape-prefix--># one
# two
# three
<!--quickbook-escape-postfix--></programlisting>
- </para>
</entry>
<entry>
<para>
@@ -3761,13 +3743,11 @@
</para>
</entry>
<entry>
- <para>
-
+
<programlisting><!--quickbook-escape-prefix-->* one
* two
* three
<!--quickbook-escape-postfix--></programlisting>
- </para>
</entry>
<entry>
<para>
@@ -4004,14 +3984,12 @@
</para>
</entry>
<entry>
- <para>
-
+
<programlisting><!--quickbook-escape-prefix-->[table Title
[[a][b][c]]
[[a][b][c]]
]
<!--quickbook-escape-postfix--></programlisting>
- </para>
</entry>
<entry>
<para>
@@ -4026,14 +4004,12 @@
</para>
</entry>
<entry>
- <para>
-
+
<programlisting><!--quickbook-escape-prefix-->[variablelist Title
[[a][b]]
[[a][b]]
]
<!--quickbook-escape-postfix--></programlisting>
- </para>
</entry>
<entry>
<para>
Modified: branches/release/tools/quickbook/test/table_1_5.gold
==============================================================================
--- branches/release/tools/quickbook/test/table_1_5.gold (original)
+++ branches/release/tools/quickbook/test/table_1_5.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -142,5 +142,38 @@
</tbody>
</tgroup>
</table>
+ <table frame="all" id="table_1_5.section1.a___b">
+ <title>A & B</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>
+ <para>
+ A
+ </para>
+ </entry>
+ <entry>
+ <para>
+ B
+ </para>
+ </entry>
+ </row>
+ </thead>
+ <tbody>
+ <row>
+ <entry>
+ <para>
+ a
+ </para>
+ </entry>
+ <entry>
+ <para>
+ b
+ </para>
+ </entry>
+ </row>
+ </tbody>
+ </tgroup>
+ </table>
</section>
</article>
Modified: branches/release/tools/quickbook/test/table_1_5.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/table_1_5.quickbook (original)
+++ branches/release/tools/quickbook/test/table_1_5.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -35,4 +35,9 @@
[[cell]]
]
+[table A & B
+ [[A][B]]
+ [[a][b]]
+]
+
[endsect]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/template-section.gold
==============================================================================
--- branches/release/tools/quickbook/test/template-section.gold (original)
+++ branches/release/tools/quickbook/test/template-section.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -6,22 +6,20 @@
<articleinfo>
</articleinfo>
<para>
+ Some text before the section.
+ </para>
+ <section id="section_in_a_template.test">
+ <title><link linkend="section_in_a_template.test">Test</link></title>
<para>
- It's a pity if the whole template is wrapped in a paragraph.
+ Hello.
</para>
- <section id="section_in_a_template.test">
- <title><link linkend="section_in_a_template.test">Test</link></title>
- <para>
- Hello.
- </para>
- <anchor id="section_in_a_template.test.just_to_test_id_generation"/>
- <bridgehead renderas="sect3">
- <link linkend="section_in_a_template.test.just_to_test_id_generation">Just
- to test id generation</link>
- </bridgehead>
- <para>
- Goodbye.
- </para>
- </section>
- </para>
+ <anchor id="section_in_a_template.test.just_to_test_id_generation"/>
+ <bridgehead renderas="sect3">
+ <link linkend="section_in_a_template.test.just_to_test_id_generation">Just
+ to test id generation</link>
+ </bridgehead>
+ <para>
+ Goodbye.
+ </para>
+ </section>
</article>
Modified: branches/release/tools/quickbook/test/template-section.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/template-section.quickbook (original)
+++ branches/release/tools/quickbook/test/template-section.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -4,7 +4,7 @@
[template nestedsection[]
-It's a pity if the whole template is wrapped in a paragraph.
+Some text before the section.
[section Test]
Modified: branches/release/tools/quickbook/test/templates.gold
==============================================================================
--- branches/release/tools/quickbook/test/templates.gold (original)
+++ branches/release/tools/quickbook/test/templates.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -13,24 +13,18 @@
foo baz
</para>
<para>
- <para>
- foo baz
- </para>
+ foo baz
</para>
<para>
- <para>
- This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
- kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
- </para>
+ This is a complete paragraph. kalamazoo kalamazoo kalamazoo kalamazoo kalamazoo
+ kalamazoo kalamazoo kalamazoo kalamazoo.... blah blah blah......
</para>
<para>
<hey>baz</hey>
</para>
<para>
- <para>
- This is a complete paragraph. madagascar madagascar madagascar madagascar
- madagascar madagascar madagascar madagascar madagascar.... blah blah blah......
- </para>
+ This is a complete paragraph. madagascar madagascar madagascar madagascar madagascar
+ madagascar madagascar madagascar madagascar.... blah blah blah......
</para>
<para>
zoom peanut zoom
@@ -44,14 +38,12 @@
<para>
wxyz wxyz trail
</para>
- <para>
-
+
<programlisting><phrase role="keyword">int</phrase> <phrase role="identifier">main</phrase><phrase role="special">()</phrase>
<phrase role="special">{</phrase>
<phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">cout</phrase> <phrase role="special"><<</phrase> "Hello, World" <phrase role="special"><<</phrase> <phrase role="identifier">std</phrase><phrase role="special">::</phrase><phrase role="identifier">endl</phrase><phrase role="special">;</phrase>
<phrase role="special">}</phrase>
</programlisting>
- </para>
<para>
x<superscript>2</superscript>
</para>
@@ -71,4 +63,7 @@
[fool]
</para>
</section>
+ <section id="templates.empty_templates">
+ <title><link linkend="templates.empty_templates">Empty Templates</link></title>
+ </section>
</article>
Modified: branches/release/tools/quickbook/test/templates.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/templates.quickbook (original)
+++ branches/release/tools/quickbook/test/templates.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -105,5 +105,42 @@
[template foo 1]
[fool]
+[template blah 10]
+
[endsect]
+[section Empty Templates]
+
+[template empty1]
+[template empty2 ]
+[template empty3 [/comment]]
+[template empty4 [/comment]
+
+]
+[template empty5
+]
+[template empty6
+
+]
+[template empty7
+[/comment]
+]
+[template empty8
+
+[/comment]
+]
+[template empty_arg1[x]]
+[template empty_arg2[x y]]
+
+[empty1]
+[empty2]
+[empty3]
+[empty4]
+[empty5]
+[empty6]
+[empty7]
+[empty8]
+[empty_arg1 1]
+[empty_arg2 1 2]
+
+[endsect]
\ No newline at end of file
Modified: branches/release/tools/quickbook/test/templates_1_4.gold
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_4.gold (original)
+++ branches/release/tools/quickbook/test/templates_1_4.gold 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -15,7 +15,7 @@
{1-2} {1-2} {1-2 3 4} {1 2-3 4} {1 2 3-4} {[1-2} {1..2-3} {1..2-3}
</para>
<para>
- {[binary 1 2- {1 2-y}} 4]
+ {[binary 1 2-3} 4]
</para>
<para>
{1-2-3} {1-2-3} {1-2-3 4} {1 2-3-4} {[1-2-3}
Modified: branches/release/tools/quickbook/test/templates_1_4.quickbook
==============================================================================
--- branches/release/tools/quickbook/test/templates_1_4.quickbook (original)
+++ branches/release/tools/quickbook/test/templates_1_4.quickbook 2010-07-10 11:25:25 EDT (Sat, 10 Jul 2010)
@@ -27,8 +27,7 @@
[binary 1.\.2..3] [/ {1..2-3} ]
[binary 1.\.2 3] [/ {1..2-3} ]
-[binary [binary 1 2..3] 4] [/ {[binary 1 2- {1 2-y}} 4] ]
-[/ This is obviously wrong, but I don't feel up to fixing it at the moment.]
+[binary [binary 1 2..3] 4] [/ {[binary 1 2-3} 4] ]
[template ternary[x y z] {[x]-[y]-[z]}]
[ternary 1..2..3] [/ {1-2-3} ]
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