1
0
Fork 0
mirror of https://github.com/KingDuckZ/kamokan.git synced 2024-12-27 21:35:41 +00:00

Make non-highlighted pasties white so they are readable.

Also disable line number generation as I plan to add them
in a different way later on.
This commit is contained in:
King_DuckZ 2017-05-23 09:24:11 +01:00
parent 7115e9eb63
commit 7ada0f155b

View file

@ -85,6 +85,7 @@ namespace tawashi {
highlighter.setCanUseStdOut(false); highlighter.setCanUseStdOut(false);
highlighter.setTabSpaces(4); highlighter.setTabSpaces(4);
highlighter.setStyleCssFile("sh_darkness.css"); highlighter.setStyleCssFile("sh_darkness.css");
highlighter.setGenerateLineNumbers(false);
std::string processed_pastie; std::string processed_pastie;
if (m_syntax_highlight) { if (m_syntax_highlight) {
@ -93,7 +94,10 @@ namespace tawashi {
} }
else { else {
Escapist houdini; Escapist houdini;
processed_pastie = houdini.escape_html(*pastie); std::ostringstream oss;
oss << R"(<pre><tt><font color="#EDEDED">)";
oss << houdini.escape_html(*pastie) << "</font></tt></pre>\n";
processed_pastie = oss.str();
} }
if (not m_plain_text and m_syntax_highlight) { if (not m_plain_text and m_syntax_highlight) {