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", "script": "markdown-it.qml",
"resources": ["markdown-it.js"], "resources": ["markdown-it.js"],
"authors": ["@milan-rusev", "@pbek"], "authors": ["@milan-rusev", "@pbek"],
"version": "1.1.0", "version": "1.1.1",
"minAppVersion": "17.08.2", "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>." "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 //Get original styles
var head = html.match(new RegExp("<head>(?:.|\n)*?</head>"))[0]; var head = html.match(new RegExp("<head>(?:.|\n)*?</head>"))[0];
//Add custom styles //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>"; mdHtml = "<html>"+head+"<body>"+mdHtml+"</body></html>";