1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-10-30 15:42:41 +01:00

Prevented whitespace in codeblocks being trimmed

For #1771
This commit is contained in:
Dan Brown 2019-12-16 11:44:28 +00:00
parent 02af69ddf2
commit f122bebae7
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9

View File

@ -97,7 +97,7 @@ function highlight() {
function highlightElem(elem) {
const innerCodeElem = elem.querySelector('code[class^=language-]');
elem.innerHTML = elem.innerHTML.replace(/<br\s*[\/]?>/gi ,'\n');
const content = elem.textContent.trim();
const content = elem.textContent;
let mode = '';
if (innerCodeElem !== null) {