diff --git a/public/react/src/App.css b/public/react/src/App.css index a6f1d45e7..2b3d8d08c 100644 --- a/public/react/src/App.css +++ b/public/react/src/App.css @@ -55,6 +55,10 @@ html, body { .markdown-body p { white-space: pre-wrap; } +/* https://www.educoder.net/courses/2346/group_homeworks/34405/question */ +.renderAsHtml.markdown-body p { + white-space: inherit; +} /* resize */ .editormd .CodeMirror { border-right: none !important; diff --git a/public/react/src/common/TextUtil.js b/public/react/src/common/TextUtil.js index 4c83131f1..74cdef3e6 100644 --- a/public/react/src/common/TextUtil.js +++ b/public/react/src/common/TextUtil.js @@ -9,6 +9,7 @@ export function markdownToHTML(oldContent, selector) { window.$('#md_div').html('') // markdown to html if (selector && oldContent && oldContent.startsWith('