From ba13ac7dc3eb88a60580e11bb790ad766d286ec9 Mon Sep 17 00:00:00 2001 From: Le Tan Date: Fri, 2 Mar 2018 22:36:37 +0800 Subject: [PATCH] set to break-all --- src/resources/themes/v_moonlight/v_moonlight.css | 1 + src/resources/themes/v_pure/v_pure.css | 4 +++- src/resources/themes/v_white/v_white.css | 4 +++- src/vnote.cpp | 3 ++- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/resources/themes/v_moonlight/v_moonlight.css b/src/resources/themes/v_moonlight/v_moonlight.css index 19593110..e30d7f0b 100644 --- a/src/resources/themes/v_moonlight/v_moonlight.css +++ b/src/resources/themes/v_moonlight/v_moonlight.css @@ -50,6 +50,7 @@ a { padding: 0; vertical-align: baseline; text-decoration: none; + word-break: break-all; } a:hover { diff --git a/src/resources/themes/v_pure/v_pure.css b/src/resources/themes/v_pure/v_pure.css index 8c5a26a7..653134aa 100644 --- a/src/resources/themes/v_pure/v_pure.css +++ b/src/resources/themes/v_pure/v_pure.css @@ -49,10 +49,12 @@ a { margin: 0; padding: 0; vertical-align: baseline; + text-decoration: none; + word-break: break-all; } a:hover { - text-decoration: none; + text-decoration: underline; color: #ff6600; } diff --git a/src/resources/themes/v_white/v_white.css b/src/resources/themes/v_white/v_white.css index 23dc001e..70baf3c1 100644 --- a/src/resources/themes/v_white/v_white.css +++ b/src/resources/themes/v_white/v_white.css @@ -48,10 +48,12 @@ a { margin: 0; padding: 0; vertical-align: baseline; + text-decoration: none; + word-break: break-all; } a:hover { - text-decoration: none; + text-decoration: underline; color: #ff6600; } diff --git a/src/vnote.cpp b/src/vnote.cpp index 3cb174b1..2300086a 100644 --- a/src/vnote.cpp +++ b/src/vnote.cpp @@ -125,7 +125,8 @@ QString VNote::generateHtmlTemplate(const QString &p_renderBg, "word-break: break-all !important; }\n" "pre code { white-space: pre-wrap !important; " "word-break: break-all !important; }\n" - "code { word-break: break-all !important; }\n"; + "code { word-break: break-all !important; }\n" + "a { 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.