【问题标题】:mermaidjs gitgraph how to create tag on mainmermaidjs gitgraph how to create tag on main
【发布时间】:2022-12-01 19:14:01
【问题描述】:

I receive a syntax error when trying to create a tag on my main branch in the example below:

    gitGraph
       commit
       tag: "v1.0"
       branch dev
       branch update-MS1-reference
       commit
       checkout dev
       merge update-MS1-reference 
       tag: "v1.1rc00"
       checkout update-MS1-reference
       commit
       checkout dev
       merge update-MS1-reference 
       tag: "v1.1rc01"
       checkout main
       merge dev
       tag: "v1.1"

If i try it in mermaid.live, i get this error message:
Expecting 'GG', 'EOF', 'NL', 'acc_title', 'acc_descr', 'acc_descr_multiline_value', 'section', 'CHECKOUT', 'BRANCH', 'CHERRY_PICK', 'MERGE', 'COMMIT', 'open_directive', ';', got 'COMMIT_TAG'

Why can i not create tags on the main branch? I see no errors if i remove the tags from main like this:

    gitGraph
       commit
       branch dev
       branch update-MS1-reference
       commit
       checkout dev
       merge update-MS1-reference 
       tag: "v1.1rc00"
       checkout update-MS1-reference
       commit
       checkout dev
       merge update-MS1-reference 
       tag: "v1.1rc01"
       checkout main
       merge dev

【问题讨论】:

    标签: mermaid


    【解决方案1】:

    It seems to not be related to main at all, i was doing line breaks without spaces, so it would see "committag: "1.0". After adding a space after commit on the line above, it worked

    【讨论】:

      猜你喜欢
      • 2022-12-02
      • 2022-12-01
      • 2022-12-27
      • 2022-12-27
      • 2022-12-27
      • 2022-11-20
      • 2022-12-31
      • 2023-02-25
      • 2022-12-01
      相关资源
      最近更新 更多