]> BookStack Code Mirror - bookstack/commitdiff
Fixed inline code overflowing off of page in issue #1575. 1587/head
authorJames Geiger <redacted>
Thu, 15 Aug 2019 04:45:48 +0000 (23:45 -0500)
committerJames Geiger <redacted>
Thu, 15 Aug 2019 04:45:48 +0000 (23:45 -0500)
resources/assets/js/services/code.js
resources/assets/sass/_text.scss

index 1e0e48289d595132a5ef0e08d006d3c249352d3f..4ab25aeb7dcbef45f71c1c3e683c66df90daac11 100644 (file)
@@ -102,6 +102,7 @@ function highlightElem(elem) {
         value: content,
         mode:  mode,
         lineNumbers: true,
+        lineWrapping: true,
         theme: getTheme(),
         readOnly: true
     });
@@ -188,6 +189,7 @@ function wysiwygView(elem) {
         value: content,
         mode:  getMode(lang),
         lineNumbers: true,
+        lineWrapping: true,
         theme: getTheme(),
         readOnly: true
     });
@@ -213,8 +215,8 @@ function popupEditor(elem, modeSuggestion) {
         value: content,
         mode:  getMode(modeSuggestion),
         lineNumbers: true,
-        theme: getTheme(),
-        lineWrapping: true
+        lineWrapping: true,
+        theme: getTheme()
     });
 }
 
@@ -254,8 +256,8 @@ function markdownEditor(elem) {
         value: content,
         mode: "markdown",
         lineNumbers: true,
-        theme: getTheme(),
         lineWrapping: true,
+        theme: getTheme(),
         scrollPastEnd: true,
     });
 }
index f1d165a47f991ddb94e31f20bcf88a86b9fa94fe..5959ddab1d7096c2c5c292d0420e43d5c06185b9 100644 (file)
@@ -220,7 +220,7 @@ code {
   @extend .code-base;
   display: inline;
   padding: 1px 3px;
-  white-space:pre;
+  white-space:pre-wrap;
   line-height: 1.2em;
   margin-bottom: 1.2em;
 }
@@ -366,4 +366,3 @@ span.sep {
   margin-right: $-xs;
   pointer-events: none;
 }
-