From 3943f607c7ced0a9601a86f3f073ede0e5dd0ee0 Mon Sep 17 00:00:00 2001 From: albert-github Date: Fri, 1 Feb 2019 19:11:59 +0100 Subject: issue #6812 Empty lines are lost when copy-pasting from code section. In case of an empty line insert an space so the line will be shown with copy & paste (including the space!). --- src/htmlgen.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index b8fc5a2..ee92668 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -667,7 +667,15 @@ void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers) void HtmlCodeGenerator::endCodeLine() { - if (m_streamSet) m_t << ""; + if (m_streamSet) + { + if (m_col == 0) + { + m_t << " "; + m_col++; + } + m_t << ""; + } } void HtmlCodeGenerator::startFontClass(const char *s) -- cgit v0.12