mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-09-12 20:09:46 +02:00
Added default new line in the diagram text before parsing for special case where code is trimmed
This commit is contained in:
@@ -69,6 +69,7 @@ import DOMPurify from 'dompurify';
|
|||||||
* @returns {any}
|
* @returns {any}
|
||||||
*/
|
*/
|
||||||
function parse(text) {
|
function parse(text) {
|
||||||
|
text = text + '\n';
|
||||||
const cnf = configApi.getConfig();
|
const cnf = configApi.getConfig();
|
||||||
const graphInit = utils.detectInit(text, cnf);
|
const graphInit = utils.detectInit(text, cnf);
|
||||||
if (graphInit) {
|
if (graphInit) {
|
||||||
|
Reference in New Issue
Block a user