diff options
-rw-r--r-- | web/react/utils/markdown.jsx | 4 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_markdown.scss | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 47b3a9a66..8b3602a89 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -151,6 +151,10 @@ class MattermostMarkdownRenderer extends marked.Renderer { ); } + codespan(text) { + return '<pre class="text-nowrap">' + super.codespan(text) + '</pre>'; + } + br() { if (this.formattingOptions.singleline) { return ' '; diff --git a/web/sass-files/sass/partials/_markdown.scss b/web/sass-files/sass/partials/_markdown.scss index 0ba1929e0..a08379ae1 100644 --- a/web/sass-files/sass/partials/_markdown.scss +++ b/web/sass-files/sass/partials/_markdown.scss @@ -54,6 +54,13 @@ code { white-space: pre; } + pre { + &.text-nowrap { + code { + white-space: nowrap; + } + } + } } .markdown__table { background: #fff; |