diff --git a/packages/mermaid/src/diagrams/git/gitGraphAst.ts b/packages/mermaid/src/diagrams/git/gitGraphAst.ts index 23cd20d80..b0a5ffd31 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphAst.ts +++ b/packages/mermaid/src/diagrams/git/gitGraphAst.ts @@ -35,7 +35,7 @@ const state = new ImperativeState(() => ({ branchConfig: new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]), branches: new Map([[mainBranchName, null]]), currBranch: mainBranchName, - direction: 'LR', + direction: 'TB', seq: 0, options: {}, })); diff --git a/packages/mermaid/src/diagrams/git/gitGraphParser.ts b/packages/mermaid/src/diagrams/git/gitGraphParser.ts index ff046a456..8116d7d4c 100644 --- a/packages/mermaid/src/diagrams/git/gitGraphParser.ts +++ b/packages/mermaid/src/diagrams/git/gitGraphParser.ts @@ -46,6 +46,7 @@ const parseCommit = (commit: CommitAst) => { const id = commit.id; const message = commit.message ?? ''; const tags = commit.tags ?? undefined; + log.info(`Commit type`, commit.type); const type = commit.type !== undefined ? commitType[commit.type] : 0; log.info(`Commit: ${id} ${message} ${type}`); db.commit(message, id, type, tags); diff --git a/packages/parser/src/language/gitGraph/gitGraph.langium b/packages/parser/src/language/gitGraph/gitGraph.langium index 682476260..9c97e6e84 100644 --- a/packages/parser/src/language/gitGraph/gitGraph.langium +++ b/packages/parser/src/language/gitGraph/gitGraph.langium @@ -57,7 +57,7 @@ Commit: 'id:' id=STRING |'msg:'? message=STRING |'tag:' tags+=STRING - |'type:' name=('NORMAL' | 'REVERSE' | 'HIGHLIGHT') + |'type:' type=('NORMAL' | 'REVERSE' | 'HIGHLIGHT') )* EOL; Branch: 'branch' name=(ID|STRING)