]> BookStack Code Mirror - bookstack/blobdiff - resources/js/services/code.js
New translations errors.php (Portuguese, Brazilian)
[bookstack] / resources / js / services / code.js
index 718ef5721c9cb3b02774794aa5f405c7cea4a9df..a8cede5f4447787c8721c071c4214a0add48883e 100644 (file)
@@ -111,7 +111,7 @@ function highlightWithin(parent) {
 function highlightElem(elem) {
     const innerCodeElem = elem.querySelector('code[class^=language-]');
     elem.innerHTML = elem.innerHTML.replace(/<br\s*[\/]?>/gi ,'\n');
-    const content = elem.textContent;
+    const content = elem.textContent.trimEnd();
 
     let mode = '';
     if (innerCodeElem !== null) {