Merge pull request #2983 from mermaid-js/#2871_Fix-broken_GitGraph_without_ending_NL

Added default new line in the diagram text before parsing for special…
This commit is contained in:
Ashish Jain 2022-04-28 20:16:48 +02:00 committed by GitHub
commit e2c78f1ebc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {