#2732 rendering the title and descr fields for the gitGraph

This commit is contained in:
Knut Sveidqvist
2022-05-06 17:40:40 +02:00
parent 572b29b35f
commit d8682cfb5f
2 changed files with 11 additions and 1 deletions

View File

@@ -9,7 +9,7 @@
<style>
body {
/* background: rgb(221, 208, 208); */
background:#111;
/* background:#111; */
/* background:#333; */
font-family: 'Arial';
}
@@ -34,6 +34,11 @@
"git0": "#550055"
} } }%%
gitGraph
accTitle: "Git Graph"
accDescr {
Git Graph description.
Multiline description
}
commit
branch develop
commit tag:"v1.0.0"

View File

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