diff --git a/src/actions.cpp b/src/actions.cpp index 8659e84..1480166 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -1120,7 +1120,7 @@ namespace quickbook iterator last = body.content.get_quickbook_range().end(); return cl::parse(first, last, - body.is_block ? + body.is_block() ? actions.grammar().block : actions.grammar().simple_phrase ).full; @@ -1511,9 +1511,6 @@ namespace quickbook actions.qualified_section_id += actions.section_id; ++actions.section_level; - actions::string_list saved_anchors; - saved_anchors.swap(actions.anchors); - if (qbk_version_n < 103) // version 1.2 and below { actions.out << "\n
"; - actions.anchors.swap(saved_anchors); write_anchors(actions, actions.out); if (qbk_version_n < 103) // version 1.2 and below @@ -1764,7 +1760,7 @@ namespace quickbook std::string ext = paths.filename.extension().generic_string(); std::vector storage; actions.error_count += - load_snippets(paths.filename.string(), storage, ext, actions.doc_id); + load_snippets(paths.filename.string(), storage, ext); BOOST_FOREACH(template_symbol& ts, storage) { diff --git a/src/actions.hpp b/src/actions.hpp index b3769e3..4ce4bc0 100644 --- a/src/actions.hpp +++ b/src/actions.hpp @@ -54,7 +54,7 @@ namespace quickbook typedef cl::symbols string_symbols; int load_snippets(std::string const& file, std::vector& storage, - std::string const& extension, std::string const& doc_id); + std::string const& extension); std::string syntax_highlight( iterator first, iterator last, actions& escape_actions, diff --git a/src/code_snippet.cpp b/src/code_snippet.cpp index 4caf3f0..5b02c3e 100644 --- a/src/code_snippet.cpp +++ b/src/code_snippet.cpp @@ -25,12 +25,10 @@ namespace quickbook { code_snippet_actions(std::vector& storage, std::string const& filename, - std::string const& doc_id, char const* source_type) : callout_id(0) , storage(storage) , filename(filename) - , doc_id(doc_id) , source_type(source_type) {} @@ -85,7 +83,6 @@ namespace quickbook std::string id; std::vector& storage; fs::path filename; - std::string const doc_id; char const* const source_type; }; @@ -315,8 +312,7 @@ namespace quickbook std::string const& file , std::vector& storage // snippets are stored in a // vector of template_symbols - , std::string const& extension - , std::string const& doc_id) + , std::string const& extension) { std::string code; int err = detail::load(file, code); @@ -327,7 +323,7 @@ namespace quickbook iterator last(code.end()); bool is_python = extension == ".py"; - code_snippet_actions a(storage, file, doc_id, is_python ? "[python]" : "[c++]"); + code_snippet_actions a(storage, file, is_python ? "[python]" : "[c++]"); // TODO: Should I check that parse succeeded? if(is_python) { boost::spirit::classic::parse(first, last, python_code_snippet_grammar(a));