From dbd11ad06129fb5c173e04d388189f89779ce230 Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Tue, 30 Aug 2022 07:37:11 +0200 Subject: [PATCH] tweak "view source" boxes --- files/assets/css/main.css | 4 ++++ files/assets/js/comments.js | 1 - files/templates/comments.html | 4 ++-- files/templates/submission.html | 2 +- files/templates/util/assetcache.html | 2 +- 5 files changed, 8 insertions(+), 5 deletions(-) diff --git a/files/assets/css/main.css b/files/assets/css/main.css index bbea59438..94720fc29 100644 --- a/files/assets/css/main.css +++ b/files/assets/css/main.css @@ -6246,4 +6246,8 @@ blockquote + blockquote, div > blockquote:first-child, blockquote:last-child { } .text-gray { color: gray !important; +} +div.markdown { + height: auto; + white-space: pre-wrap; } \ No newline at end of file diff --git a/files/assets/js/comments.js b/files/assets/js/comments.js index 9ce029adb..5de10f53a 100644 --- a/files/assets/js/comments.js +++ b/files/assets/js/comments.js @@ -6,7 +6,6 @@ function poll_vote_no_v() { function expandMarkdown(id,type) { const ta = document.getElementById('markdown-'+id); ta.classList.toggle('d-none'); - autoExpand(ta); document.getElementsByClassName('text-expand-icon-'+id)[0].classList.toggle('fa-expand-alt'); document.getElementsByClassName('text-expand-icon-'+id)[0].classList.toggle('fa-compress-alt'); diff --git a/files/templates/comments.html b/files/templates/comments.html index cb55aca07..b50c7a298 100644 --- a/files/templates/comments.html +++ b/files/templates/comments.html @@ -554,7 +554,7 @@ {% if v and v.id != c.author_id and c.body %} - +
{{c.body.strip()}}
{% endif %} @@ -885,7 +885,7 @@ {% include "expanded_image_modal.html" %} - +