Browse Source

set <a> to break-all

Le Tan 7 years ago
parent
commit
ba13ac7dc3

+ 1 - 0
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 {

+ 3 - 1
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;
 }
 

+ 3 - 1
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;
 }
 

+ 2 - 1
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.