From 0ea7ebf1a24d319ae1a1480eda5bb404c25aa9e1 Mon Sep 17 00:00:00 2001 From: Robert Kaussow Date: Mon, 2 Aug 2021 14:06:24 +0200 Subject: [PATCH] fix: add div wrapper around markdown tables to allow overflows (#177) --- layouts/partials/content.html | 5 ++++- src/sass/_markdown.scss | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/layouts/partials/content.html b/layouts/partials/content.html index c35e992..0aff871 100644 --- a/layouts/partials/content.html +++ b/layouts/partials/content.html @@ -1 +1,4 @@ -{{ .Content | replaceRE `` `` | safeHTML }} +{{- $content := .Content -}} +{{- $content = $content | replaceRE `` `` | safeHTML -}} +{{- $content = $content | replaceRE `((?:.|\n)+?
)` `
${1}
` | safeHTML -}} +{{- $content -}} diff --git a/src/sass/_markdown.scss b/src/sass/_markdown.scss index 0a8bd90..186fe46 100644 --- a/src/sass/_markdown.scss +++ b/src/sass/_markdown.scss @@ -110,8 +110,11 @@ } } - table:not(.lntable) { + .table-wrap { overflow: auto; + } + + table:not(.lntable) { display: table; border-spacing: 0; border-collapse: collapse;