Fixed wrapper issue for multiple table elements

fixes DES-203, closes https://github.com/TryGhost/Source/issues/41
This commit is contained in:
Sodbileg Gansukh
2024-04-12 11:22:51 +08:00
parent daf120397f
commit f749b4bed0
3 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -50,10 +50,10 @@
/* Responsive HTML table */
(function () {
const tables = document.querySelectorAll('.gh-content > table:not(.gist table)');
const wrapper = document.createElement('div');
wrapper.className = 'gh-table';
tables.forEach(function (table) {
const wrapper = document.createElement('div');
wrapper.className = 'gh-table';
table.parentNode.insertBefore(wrapper, table);
wrapper.appendChild(table);
});