Commit Graph

30 Commits

Author SHA1 Message Date
Knut Sveidqvist 8dd82839cb Relocation of files 2022-09-21 11:03:33 +02:00
Elliot Nelson 183fc35fea Support EMPTYSTR in jison parser, add unit tests for git graph parser 2022-09-19 00:04:23 -04:00
Elliot Nelson 9cbacb0159 Use undefined to mean default tagging behavior 2022-09-18 16:25:10 -04:00
Elliot Nelson f37ac53118 Merge remote-tracking branch 'aloisklink/fix/broken-cherry-pick-parsing' into enelson/git-cherry-pick-tag 2022-09-18 16:21:53 -04:00
Elliot Nelson 4e4b5ccf8d feat(git): allow cherry-pick to suppress tag altogether 2022-09-18 09:22:35 -04:00
Elliot Nelson 4f96116c43
Update src/diagrams/git/parser/gitGraph.jison
Co-authored-by: Alois Klink <alois@aloisklink.com>
2022-09-18 08:59:47 -04:00
Alois Klink aba458b832 fix(git): fix cherry-pick regex parsing error
I forgot to escape the `-` character in a regex statement.

Fixes: 1527956669
2022-09-18 07:00:55 +01:00
Elliot Nelson ae920eaa93 feat(git): cherry-pick keyword supports tag attribute 2022-09-17 23:57:32 -04:00
Alois Klink 59c69600e8 fix(git): support single character branch names
In gitGraph, add support branch names that only have a single
character.

The branch regex is checking for a starting character, and an
ending character, so it currently needs at least two characters.

I've wrapped everything except the first character in a `()?` to fix
this.

There are some really complicated regexes that do match what
valid git branches are (see https://stackoverflow.com/a/12093994), but
I'm reluctant to add them in, since it will be a pain to test all
the different edgecases.

Hopefully https://github.com/mermaid-js/mermaid/pull/3432 might be used
in the future to make a better gitgraph parser!
2022-09-15 01:05:11 +01:00
Alois Klink 1527956669
fix(git): support unusual prefixes in branch name
jison throws an error if a branch name starts with an unusual prefix.

For example, a branch named `branch/test-branch` will throw a
parse error, since jison thinks it's a `branch` command, and not
a branch id.

An easy fix is to use the `(?=\s|$)` regex to ensure that only
'branch ' or 'branch\n' will be parsed as the branch command.

Fixes: https://github.com/mermaid-js/mermaid/issues/3362
2022-09-11 22:52:02 +01:00
Alois Klink 0dca4d3393
fix(git): support numeric branch names
gitGraph does not support branch names that start with a number,
because the gitGraph.jison file parses these as NUM (number) instead.

To fix this, I've changed the NUM parser to only accept strings that
end with whitespace (e.g 1234 is a NUM, but 1234abc is not a NUM).
To do this, I had to move the "skip all whitespace" step to the
end of the parser, but this doesn't seem to have caused any issues,
so it's probably fine.
2022-09-01 17:24:00 +01:00
ashishj 2229a307a1 #3238 Enhancing the merge commit functionality 2022-08-30 17:42:42 +02:00
ashishj c147404d1c #3080 Added support for cherry pick commits 2022-06-07 20:32:43 +02:00
Knut Sveidqvist a3878528c6 #3050 Renaming setTitle to setAccTitle 2022-05-17 20:23:45 +02:00
Knut Sveidqvist 3b94850084
Merge branch 'develop' into 2732_accesible_charts 2022-05-06 18:10:23 +02:00
Yuriy Husnay d740fa5acf add support for branch ordering 2022-05-04 18:04:41 +03:00
Knut Sveidqvist fdd7af9089 Adding acc to gitGrapg parser 2022-04-30 16:06:53 +02:00
Hans Petersen 3fcc43efdd Sequence autonumbering and Git fix options parsing 2022-04-28 14:25:25 +02:00
Ashish Jain a3e6d3cd76
Merge pull request #2954 from husa/feature/2936-gitgraph-pathed-branch-name
GitGraph: add support for "pathed" branches. fix #2936
2022-04-21 20:11:39 +02:00
Yuriy Husnay 3f812326a6 gitgraph #2934 support tags for merge commits 2022-04-19 18:02:41 +03:00
Yuriy Husnay 99a8c0d152 fix #2936 add support for "pathed" branches
allow "/" in branch names
2022-04-19 17:42:02 +03:00
ashishj 12c63ff007 Finalizing GitGraph with directives, theming & docs 2022-03-31 19:37:36 +02:00
Ashish Jain 243f2b28cd fix for gitGraph (:) and spaces (new line) issue 2022-03-17 19:04:37 +01:00
Ashish Jain 5a8c372666 update gitgraph jison 2022-03-03 19:58:28 +01:00
Ashish Jain bc9ff496f2 Clean up gitg=Graph JISON 2022-02-24 19:55:16 +01:00
Ashish Jain 3f6296b619 #1713, #1719, # 1720 2020-10-22 21:40:08 +02:00
zwPapEr c00b204259 gitGraph: 🔨 dot and minus should be valid branch name 2020-06-20 11:58:38 +08:00
GDFaber 94ace2348f
Revert "Multiline comments" 2020-02-29 21:32:20 +01:00
Erik Ellingsen e62027b73c Multiline comments 2020-02-27 00:02:25 +01:00
Tyler Long 3e9215b27d Rename folders 2018-03-13 15:28:48 +08:00
Renamed from src/diagrams/gitGraph/parser/gitGraph.jison (Browse further)