]> BookStack Code Mirror - bookstack/blobdiff - resources/js/services/code.js
New translations errors.php (Portuguese, Brazilian)
[bookstack] / resources / js / services / code.js
index 0c5f75db3f054880f4157bcc96d211050a95dbbb..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) {
@@ -185,7 +185,7 @@ function getMode(suggestion, content) {
  * @returns {*|string}
  */
 function getTheme() {
-    return window.codeTheme || 'mdn-like';
+    return window.codeTheme || 'default';
 }
 
 /**