From c14611d14bfd87148fbd96c9e33ed171b01dbd6a Mon Sep 17 00:00:00 2001 From: James Geiger Date: Wed, 14 Aug 2019 23:45:48 -0500 Subject: [PATCH] Fixed inline code overflowing off of page in issue #1575. --- resources/assets/js/services/code.js | 8 +++++--- resources/assets/sass/_text.scss | 3 +-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/resources/assets/js/services/code.js b/resources/assets/js/services/code.js index 1e0e48289..4ab25aeb7 100644 --- a/resources/assets/js/services/code.js +++ b/resources/assets/js/services/code.js @@ -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, }); } diff --git a/resources/assets/sass/_text.scss b/resources/assets/sass/_text.scss index f1d165a47..5959ddab1 100644 --- a/resources/assets/sass/_text.scss +++ b/resources/assets/sass/_text.scss @@ -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; } -