mirror of
https://github.com/boostorg/quickbook.git
synced 2026-01-26 18:52:26 +00:00
Quickbook: Fail gracefully if document info is missing.
I also tweaked `pre` and `post` a bit while I was at it. [SVN r75538]
This commit is contained in:
@@ -78,13 +78,16 @@ namespace quickbook
|
||||
parse_iterator last(actor.current_file->source.end());
|
||||
|
||||
cl::parse_info<parse_iterator> info = cl::parse(first, last, actor.grammar().doc_info);
|
||||
assert(info.hit);
|
||||
|
||||
if (!actor.error_count)
|
||||
{
|
||||
std::string doc_type = pre(actor.out, actor, include_doc_id, nested_file);
|
||||
parse_iterator pos = info.stop;
|
||||
std::string doc_type = pre(actor, pos, include_doc_id, nested_file);
|
||||
|
||||
info = cl::parse(info.hit ? info.stop : first, last, actor.grammar().block);
|
||||
|
||||
post(actor.out, actor, doc_type);
|
||||
post(actor, doc_type);
|
||||
|
||||
if (!info.full)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user