|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r84149 - trunk/tools/quickbook/src
From: dnljms_at_[hidden]
Date: 2013-05-05 09:46:07
Author: danieljames
Date: 2013-05-05 09:46:07 EDT (Sun, 05 May 2013)
New Revision: 84149
URL: http://svn.boost.org/trac/boost/changeset/84149
Log:
Store start of unindented block, as the original start.
Was storing the position after the removed text, this meant that I had
to use a special case for the first line, but now the algorithm is smart
enough to get it right.
Text files modified:
trunk/tools/quickbook/src/files.cpp | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
Modified: trunk/tools/quickbook/src/files.cpp
==============================================================================
--- trunk/tools/quickbook/src/files.cpp (original)
+++ trunk/tools/quickbook/src/files.cpp 2013-05-05 09:46:07 EDT (Sun, 05 May 2013)
@@ -311,11 +311,6 @@
}
}
- // Simple case for the first line, as we already know the
- // corresponding position for the start of line.
- if (newline_count == 0)
- return pos - section->our_pos + section->original_pos;
-
// The start of the line in the original source.
boost::string_ref::size_type original_line =
section->original_pos;
@@ -533,7 +528,7 @@
program.erase(pos, (std::min)(indent, next-pos));
}
- data->new_file->add_indented_mapped_file_section(x.begin() + indent);
+ data->new_file->add_indented_mapped_file_section(x.begin());
data->new_file->source_.append(program);
}
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