1
0
mirror of https://github.com/pdf2htmlEX/pdf2htmlEX.git synced 2024-12-22 13:00:08 +00:00

fixed a wrong optimization when opening a new text line

This commit is contained in:
Lu Wang 2013-06-12 13:21:10 +08:00
parent 69d083b27b
commit 47267669ce

View File

@ -95,10 +95,8 @@ void HTMLTextPage::clear(void)
void HTMLTextPage::open_new_line(const HTMLLineState & line_state) void HTMLTextPage::open_new_line(const HTMLLineState & line_state)
{ {
if((!text_lines.empty()) && (text_lines.back()->text_empty())) // do not reused the last text_line even if it's empty
{ // because the clip states may point to the next index
text_lines.pop_back();
}
text_lines.emplace_back(new HTMLTextLine(line_state, param, all_manager)); text_lines.emplace_back(new HTMLTextLine(line_state, param, all_manager));
cur_line = text_lines.back().get(); cur_line = text_lines.back().get();
} }