Auto convert <br> to <br/>

This commit is contained in:
Tyler Long 2018-03-13 21:58:37 +08:00
parent 594847ba04
commit a8e49a0d2d
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{
"name": "mermaid",
"version": "8.0.0-alpha.7",
"version": "8.0.0-alpha.8",
"description": "Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",
"main": "dist/mermaid.core.js",
"keywords": [

View File

@ -91,7 +91,7 @@ const init = function () {
txt = element.innerHTML
// transforms the html to pure text
txt = he.decode(txt).trim()
txt = he.decode(txt).trim().replace(/<br>/ig, '<br/>')
mermaidAPI.render(id, txt, (svgCode, bindFunctions) => {
element.innerHTML = svgCode