1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2024-11-17 23:38:07 +00:00

added table margins an paddings

This commit is contained in:
Patrizio Bekerle 2018-11-12 17:52:02 +01:00
parent fbaf590056
commit b188e105cc
No known key found for this signature in database
GPG key ID: 2E9FFD770DABE838
2 changed files with 2 additions and 2 deletions

View file

@ -4,7 +4,7 @@
"script": "markdown-it.qml",
"resources": ["markdown-it.js"],
"authors": ["@milan-rusev", "@pbek"],
"version": "1.1.0",
"version": "1.1.1",
"minAppVersion": "17.08.2",
"description" : "This script replaces the default markdown renderer with markdown-it.\n\n<b>Dependencies</b>\n<a href=\"https://github.com/markdown-it/markdown-it\">markdown-it.js</a> (v8.4.2 bundled with the script)\n\n<b>Usage</b>\nFor the possible configuration options check <a href=\"https://github.com/markdown-it/markdown-it/tree/master/lib/presets\">here</a>."
}

View file

@ -83,7 +83,7 @@ QtObject {
//Get original styles
var head = html.match(new RegExp("<head>(?:.|\n)*?</head>"))[0];
//Add custom styles
head = head.replace("</style>", "table {border-spacing: 0; border-style: solid; border-width: 1px; border-collapse: collapse;}" + customStylesheet + "</style>");
head = head.replace("</style>", "table {border-spacing: 0; border-style: solid; border-width: 1px; border-collapse: collapse; margin-top: 0.5em;} th, td {padding: 0 5px;}" + customStylesheet + "</style>");
mdHtml = "<html>"+head+"<body>"+mdHtml+"</body></html>";