Skip to content

Commit

Permalink
#2732 rendering the title and descr fields for the gitGraph
Browse files Browse the repository at this point in the history
  • Loading branch information
knsv committed May 6, 2022
1 parent 572b29b commit d8682cf
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cypress/platform/gitgraph.html
Expand Up @@ -9,7 +9,7 @@
<style>
body {
/* background: rgb(221, 208, 208); */
background:#111;
/* background:#111; */
/* background:#333; */
font-family: 'Arial';
}
Expand All @@ -34,6 +34,11 @@ <h1>info below</h1>
"git0": "#550055"
} } }%%
gitGraph
accTitle: "Git Graph"
accDescr {
Git Graph description.
Multiline description
}
commit
branch develop
commit tag:"v1.0.0"
Expand Down
5 changes: 5 additions & 0 deletions src/diagrams/git/gitGraphRenderer.js
Expand Up @@ -4,6 +4,8 @@ import db from './gitGraphAst';
import gitGraphParser from './parser/gitGraph';
import { log } from '../../logger';
import { getConfig } from '../../config';
import addSVGAccessibilityFields from '../../accessibility';

let allCommitsDict = {};
let branchNum;

Expand Down Expand Up @@ -480,6 +482,9 @@ export const draw = function (txt, id, ver) {

const diagram = select(`[id="${id}"]`);

// Adds title and description to the flow chart
addSVGAccessibilityFields(parser.yy, diagram, id);

drawCommits(diagram, allCommitsDict, false);
if (gitGraphConfig.showBranches) {
drawBranches(diagram, branches);
Expand Down

0 comments on commit d8682cf

Please sign in to comment.