Skip to content

Commit

Permalink
fixed some features and added propper default direction
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin Fulbright authored and Austin Fulbright committed Jul 27, 2024
1 parent a386bd0 commit 887e580
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/mermaid/src/diagrams/git/gitGraphAst.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const state = new ImperativeState<GitGraphState>(() => ({
branchConfig: new Map([[mainBranchName, { name: mainBranchName, order: mainBranchOrder }]]),
branches: new Map([[mainBranchName, null]]),
currBranch: mainBranchName,
direction: 'LR',
direction: 'TB',
seq: 0,
options: {},
}));
Expand Down
1 change: 1 addition & 0 deletions packages/mermaid/src/diagrams/git/gitGraphParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion packages/parser/src/language/gitGraph/gitGraph.langium
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 887e580

Please sign in to comment.