mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-12-10 22:44:11 +01:00
Fix #1603 Remove entity-decode Dependency.
This commit is contained in:
@@ -2,8 +2,6 @@
|
||||
* Web page integration module for the mermaid framework. It uses the mermaidAPI for mermaid functionality and to render
|
||||
* the diagrams to svg code.
|
||||
*/
|
||||
// import { decode } from 'he';
|
||||
import decode from 'entity-decode/browser';
|
||||
import { log } from './logger';
|
||||
import mermaidAPI from './mermaidAPI';
|
||||
import utils from './utils';
|
||||
@@ -98,7 +96,8 @@ const init = function() {
|
||||
txt = element.innerHTML;
|
||||
|
||||
// transforms the html to pure text
|
||||
txt = decode(txt)
|
||||
txt = utils
|
||||
.entityDecode(txt)
|
||||
.trim()
|
||||
.replace(/<br\s*\/?>/gi, '<br/>');
|
||||
|
||||
|
||||
Reference in New Issue
Block a user