Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/zzossig/hugo-theme-zdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/script/single-script.html')
-rw-r--r--layouts/partials/script/single-script.html12
1 files changed, 12 insertions, 0 deletions
diff --git a/layouts/partials/script/single-script.html b/layouts/partials/script/single-script.html
index 81358f4..599bef1 100644
--- a/layouts/partials/script/single-script.html
+++ b/layouts/partials/script/single-script.html
@@ -71,6 +71,18 @@
document.addEventListener('DOMContentLoaded', function () {
'use strict';
+ // ======================== markdown table =========================
+ var tables = document.querySelectorAll('.single__contents > table');
+ for (let i = 0; i < tables.length; i++) {
+ var table = tables[i];
+ var wrapper = document.createElement('div');
+ wrapper.className = 'table-wrapper';
+ table.parentElement.replaceChild(wrapper, table);
+ wrapper.appendChild(table);
+ }
+ // =================================================================
+
+
// ============================ mermaid ============================
{{ $lib := .Params.libraries }}
var lib = JSON.parse({{ $lib | jsonify }});