diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 47b3a9a668..8b3602a89d 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 '
' + super.codespan(text) + '
'; + } + 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 0ba1929e07..a08379ae1b 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;