mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.79k stars 6.08k forks source link

Adds 'Switch' as an Alias for 'Checkout` #5445

Closed FutzMonitor closed 2 months ago

FutzMonitor commented 3 months ago

:bookmark_tabs: Summary

Adds switch as an alias for checkout.

Resolves #5422

:straight_ruler: Design Decisions

Updated the regex that returns CHECKOUT to also work for switch. I added some test coverage to both parser specs.

:clipboard: Tasks

Make sure you

netlify[bot] commented 3 months ago

Deploy Preview for mermaid-js ready!

Name Link
Latest commit e048085b5ab12a670df856381081407cf1e35a94
Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/661a1fa71123d50008436aa5
Deploy Preview https://deploy-preview-5445--mermaid-js.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 5.74%. Comparing base (9ed2f4b) to head (e048085).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5445/graphs/tree.svg?width=650&height=150&src=pr&token=BaET4V1BdM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5445?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) ```diff @@ Coverage Diff @@ ## develop #5445 +/- ## ========================================== - Coverage 5.74% 5.74% -0.01% ========================================== Files 276 277 +1 Lines 41886 41897 +11 Branches 514 489 -25 ========================================== Hits 2407 2407 - Misses 39479 39490 +11 ``` | [Flag](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5445/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Ξ” | | |---|---|---| | [unit](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5445/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | `5.74% <ΓΈ> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5445/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)
FutzMonitor commented 3 months ago

Wondeful implementation! Can you add a rendering test as well?

I only added two rendering test because it seems redundant to have switch be tested again every single test that is present for checkout. If this doesn't suffice though let me know, and I'll implement some more.

jaschop-1k5o commented 2 months ago

Thanks for taking the time for my issue @FutzMonitor , and with breathtaking speed too! Much love :heart: :heart: :heart: