From f9c60d477d18a73c85fd277d75aeafb8edc1fbec Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Sat, 16 Mar 2024 05:01:53 +0100 Subject: [PATCH] Simplify b3fe9cb7049da --- src/graphics/PreviewLoader.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/graphics/PreviewLoader.cpp b/src/graphics/PreviewLoader.cpp index dc944b1929..d39a6a8513 100644 --- a/src/graphics/PreviewLoader.cpp +++ b/src/graphics/PreviewLoader.cpp @@ -852,7 +852,6 @@ void PreviewLoader::Impl::dumpData(odocstream & os, Encoding const & enc = buffer_.params().encoding(); for (; it != end; ++it) { - docstring res; bool uncodable_content = false; // check whether the content is encodable // FIXME: the preview loader should be able @@ -864,14 +863,13 @@ void PreviewLoader::Impl::dumpData(odocstream & os, << docstring(1, n) << "' in preview snippet!"); uncodable_content = true; - } else - res += n; + } } // FIXME UNICODE os << "\\begin{preview}\n"; // do not show incomplete preview if (!uncodable_content) - os << res; + os << from_utf8(it->first); os << "\n\\end{preview}\n\n"; } }