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.63k stars 6.05k forks source link

Fixed wrong ELK detector #5579

Closed nirname closed 1 week ago

nirname commented 1 week ago

:bookmark_tabs: Summary

Brief description about the content of your PR.

Resolves #5507

:straight_ruler: Design Decisions

We have to check only the beginning of the line so we need grouping. This

/^\s*flowchar|graph/.test("some graph")

was returning true, but it should not.

:clipboard: Tasks

Make sure you

netlify[bot] commented 1 week ago

Deploy Preview for mermaid-js ready!

Name Link
Latest commit 66cd0b96219ff41e451ce18001d754a26a5180ec
Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/6673375b7c907f0008b91bfe
Deploy Preview https://deploy-preview-5579--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 1 week ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 5.73%. Comparing base (0044aa3) to head (66cd0b9).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5579/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/5579?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 #5579 +/- ## ======================================= Coverage 5.73% 5.73% ======================================= Files 277 277 Lines 41988 41988 Branches 515 515 ======================================= Hits 2409 2409 Misses 39579 39579 ``` | [Flag](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5579/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/5579/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | `5.73% <0.00%> (ΓΈ)` | | 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. | [Files](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5579?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Ξ” | | |---|---|---| | [packages/mermaid-flowchart-elk/src/detector.ts](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5579?src=pr&el=tree&filepath=packages%2Fmermaid-flowchart-elk%2Fsrc%2Fdetector.ts&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#diff-cGFja2FnZXMvbWVybWFpZC1mbG93Y2hhcnQtZWxrL3NyYy9kZXRlY3Rvci50cw==) | `0.00% <0.00%> (ΓΈ)` | |
varon commented 1 week ago

Thanks for the fix - code LGTM.