From e8cfb4f2bed8c786da9ceccbe1599c33e23a6565 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sat, 15 Feb 2020 14:24:55 +0000 Subject: [PATCH] Removed unintended extra lines in code blocks Fixes #1877 --- resources/js/services/code.js | 2 +- resources/sass/_text.scss | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/resources/js/services/code.js b/resources/js/services/code.js index 718ef5721..a8cede5f4 100644 --- a/resources/js/services/code.js +++ b/resources/js/services/code.js @@ -111,7 +111,7 @@ function highlightWithin(parent) { function highlightElem(elem) { const innerCodeElem = elem.querySelector('code[class^=language-]'); elem.innerHTML = elem.innerHTML.replace(//gi ,'\n'); - const content = elem.textContent; + const content = elem.textContent.trimEnd(); let mode = ''; if (innerCodeElem !== null) { diff --git a/resources/sass/_text.scss b/resources/sass/_text.scss index 77e0773eb..d28706781 100644 --- a/resources/sass/_text.scss +++ b/resources/sass/_text.scss @@ -238,7 +238,6 @@ code { padding: 1px 3px; white-space:pre-wrap; line-height: 1.2em; - margin-bottom: 1.2em; } span.code {