Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-letter branch name causes "Lexical error" #3463

Closed
drok opened this issue Sep 14, 2022 · 0 comments · Fixed by #3464
Closed

Single-letter branch name causes "Lexical error" #3463

drok opened this issue Sep 14, 2022 · 0 comments · Fixed by #3464
Assignees
Labels
Graph: Git Type: Bug / Error Something isn't working or is incorrect

Comments

@drok
Copy link

drok commented Sep 14, 2022

Describe the bug
Graph fails to render if the branch name is a single letter

To Reproduce
Use a single letter branch name:

 branch A

Expected behavior
A graph should be rendered instead of an error shown.

Screenshots
Broken sample (throws error):

gitGraph
 commit
 branch A
 commit
 checkout A

Loading

Broken sample (branch name given as mainBranchName parameter):

%%{init: { 'gitGraph': {'mainBranchName': 'A'}} }%%
gitGraph
 commit id: " " tag: "v1.0"
 branch branch1 order: 3
 checkout A
 commit id: "1st-commit"

Loading

Working example (graph is rendered):

gitGraph
 commit
 branch Ax
 commit
 checkout Ax

Loading

Code Sample
Broken Sample

Broken Sample with mainBranchName

Working Sample

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser Chrome Version 105.0.5195.102 (Official Build) (64-bit)
  • Version [e.g. 22]
@drok drok added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 14, 2022
@aloisklink aloisklink added Graph: Git and removed Status: Triage Needs to be verified, categorized, etc labels Sep 15, 2022
@aloisklink aloisklink self-assigned this Sep 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graph: Git Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants