Skip to content

Commit 4b82268

Browse files
committed
Keep explicit newlines
1 parent fb9f68e commit 4b82268

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

trainingportal/util.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,9 @@ exports.parseMarkdown = (text) => {
105105
let html = markdown.toHTML(text);
106106
//made code tag non bindable by angular
107107
html = html.replace(/<code/g,"<code ng-non-bindable ");
108+
109+
//Keep explicit newlines in markdown written as `<br>`
110+
html = html.replace(/&lt;br&gt;/g,"<br>");
108111
return html
109112
}
110113

0 commit comments

Comments
 (0)