summaryrefslogtreecommitdiffstats
path: root/web/react
diff options
context:
space:
mode:
Diffstat (limited to 'web/react')
-rw-r--r--web/react/utils/markdown.jsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx
index 8cfcfdefd..f1d15615e 100644
--- a/web/react/utils/markdown.jsx
+++ b/web/react/utils/markdown.jsx
@@ -68,7 +68,7 @@ export class MattermostMarkdownRenderer extends marked.Renderer {
code(code, language) {
if (!language || highlightJs.listLanguages().indexOf(language) < 0) {
let parsed = super.code(code, language);
- return '<code class="hljs">' + parsed.substr(11, parsed.length - 17);
+ return '<code class="hljs">' + $(parsed).text() + '</code>';
}
let parsed = highlightJs.highlight(language, code);