Skip to content

Commit

Permalink
issue #6812 Empty lines are lost when copy-pasting from code section.
Browse files Browse the repository at this point in the history
In case of an empty line insert an space so the line will be shown with copy & paste (including the space!).
  • Loading branch information
albert-github committed Feb 1, 2019
1 parent 9778b72 commit 3943f60
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/htmlgen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,15 @@ void HtmlCodeGenerator::startCodeLine(bool hasLineNumbers)

void HtmlCodeGenerator::endCodeLine()
{
if (m_streamSet) m_t << "</div>";
if (m_streamSet)
{
if (m_col == 0)
{
m_t << " ";
m_col++;
}
m_t << "</div>";
}
}

void HtmlCodeGenerator::startFontClass(const char *s)
Expand Down

0 comments on commit 3943f60

Please sign in to comment.