From 78b239545b5378466555fb691b228da35c1acc21 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Wed, 21 Mar 2018 19:31:52 +0800 Subject: [PATCH] export: force wrap and word-break for line number of code block --- src/vnote.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/vnote.cpp b/src/vnote.cpp index c41b649c..7117919f 100644 --- a/src/vnote.cpp +++ b/src/vnote.cpp @@ -128,7 +128,9 @@ QString VNote::generateHtmlTemplate(const QString &p_renderBg, "code { word-break: break-all !important; }\n" "div.flowchart-diagram { overflow: hidden !important; }\n" "div.mermaid-diagram { overflow: hidden !important; }\n" - "a { word-break: break-all !important; }\n"; + "a { word-break: break-all !important; }\n" + "td.hljs-ln-code { white-space: pre-wrap !important; " + "word-break: break-all !important; }\n"; if (!g_config->getEnableImageConstraint()) { // Constain the image width by force in PDF, otherwise, the PDF will // be cut off.