Skip to content

Commit

Permalink
Merge pull request #2983 from mermaid-js/#2871_Fix-broken_GitGraph_wi…
Browse files Browse the repository at this point in the history
…thout_ending_NL

Added default new line in the diagram text before parsing for special…
  • Loading branch information
ashishjain0512 committed Apr 28, 2022
2 parents bada661 + b30790c commit e2c78f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/mermaidAPI.js
Expand Up @@ -69,6 +69,7 @@ import DOMPurify from 'dompurify';
* @returns {any}
*/
function parse(text) {
text = text + '\n';
const cnf = configApi.getConfig();
const graphInit = utils.detectInit(text, cnf);
if (graphInit) {
Expand Down

0 comments on commit e2c78f1

Please sign in to comment.