[poppler] poppler/TextOutputDev.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Sun Feb 14 11:14:00 UTC 2021
poppler/TextOutputDev.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit d6cccfb8d814d89c51c9e65563be2e475f46212b
Author: Nelson Benítez León <nbenitezl at gmail.com>
Date: Mon Feb 8 14:06:15 2021 -0400
TextSelectionDumper: Fix getText() for space after word
Fix TextSelectionDumper::getText() (which is
currently only used by the glib frontend) to
not default to add a space after word in the
case the word is explicitly set to not carry
that space by means of the 'spaceAfter' TextWord
field.
Fixes issue #1042
diff --git a/poppler/TextOutputDev.cc b/poppler/TextOutputDev.cc
index 451b4cb6..10a3b5f3 100644
--- a/poppler/TextOutputDev.cc
+++ b/poppler/TextOutputDev.cc
@@ -4420,7 +4420,7 @@ GooString *TextSelectionDumper::getText()
TextWordSelection *sel = (*lineWords)[j];
page->dumpFragment(sel->word->text + sel->begin, sel->end - sel->begin, uMap, text);
- if (j < lineWords->size() - 1)
+ if (j < lineWords->size() - 1 && sel->word->spaceAfter)
text->append(space, spaceLen);
}
if (i < nLines - 1)
More information about the poppler
mailing list