fix: add div wrapper around markdown tables to allow overflows (#177)

This commit is contained in:
Robert Kaussow 2021-08-02 14:06:24 +02:00 committed by GitHub
parent 4bae11bdc6
commit 0ea7ebf1a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 2 deletions

View File

@ -1 +1,4 @@
{{ .Content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML }} {{- $content := .Content -}}
{{- $content = $content | replaceRE `<nav id="TableOfContents">\s*<ul>\s*<li>\s*<ul>` `<nav id="TableOfContents"><ul>` | replaceRE `</ul>\s*</li>\s*</ul>\s*</nav>` `</ul></nav>` | safeHTML -}}
{{- $content = $content | replaceRE `(<table>(?:.|\n)+?</table>)` `<div class=table-wrap> ${1} </div>` | safeHTML -}}
{{- $content -}}

View File

@ -110,8 +110,11 @@
} }
} }
table:not(.lntable) { .table-wrap {
overflow: auto; overflow: auto;
}
table:not(.lntable) {
display: table; display: table;
border-spacing: 0; border-spacing: 0;
border-collapse: collapse; border-collapse: collapse;