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

Allow Semicolons in Timeline Titles, Sections, Periods, and Events #5335

Merged
merged 9 commits into from
Aug 20, 2024

Conversation

FutzMonitor
Copy link
Contributor

@FutzMonitor FutzMonitor commented Feb 27, 2024

📑 Summary

This pull request removes the semicolons from the title, section, events, and periods regex so that semicolons can be used in their text content.

Resolves #4175. This doesn't directly address that issue, but I wanted to link it because my ultimate goal is to figure out how to allow colons without them being identified as tokens.

📏 Design Decisions

I simply removed the semicolon symbol from the exclusion clause regex for the title, section, event and period. I almost made sure to add a test to the timeline test suite and run pnpm test to ensure that it was still working.

📋 Tasks

Make sure you

1. Removed the semicolon from the regex for titles, sections, periods, and events.
Changes to timeline.spec.js
1. Added a test for the changes made in the timeline parser
Copy link

netlify bot commented Feb 27, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 262bf4e
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/66c45a25395272000884ddb1
😎 Deploy Preview https://deploy-preview-5335--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.

Copy link

codecov bot commented Feb 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 5.22%. Comparing base (210f8c2) to head (262bf4e).
Report is 17 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           develop   #5335   +/-   ##
=======================================
  Coverage     5.22%   5.22%           
=======================================
  Files          323     323           
  Lines        46212   46212           
  Branches       537     537           
=======================================
  Hits          2415    2415           
  Misses       43797   43797           
Flag Coverage Δ
unit 5.22% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@FutzMonitor FutzMonitor changed the title Changes to timeline.jison Allow Semicolons in Timeline Titles, Sections, Periods, and Events Mar 3, 2024
1. Re-organized the new TL-6 test to not use a for-loop with a switch case.
2. Imported the commonDb module to ensure titles are be tested.
3. Use indices to retrieve elements that need to be tested.
Copy link
Contributor Author

@FutzMonitor FutzMonitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed the test so that it uses indices to access events instead of using a for-loop with a switch case which was unnecessary.

Copy link

argos-ci bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 47 changed Aug 20, 2024, 9:07 AM

* develop: (485 commits)
  [autofix.ci] apply automated fixes
  add MonsterWriter to list of community integrations
  fix: Making insertCluster async
  Ignore codeql warning
  Removed the un-necessary test
  Fixed broken test
  [autofix.ci] apply automated fixes
  Fixed lint issue
  mermaid-js#5237 Fix for text alignment for handdrawn text using svg labels
  mermaid-js#5237 Fix for subroutine positioning
  Updated handDrawn cypress test
  adding handDrawn cypress test
  mermaid-js#5237 Async fix for clusters
  sequence diagram NaN values issue
  review comment fixes
  mermaid-js#5237 Replace generic object with Map
  mermaid-js#5237 Removing old flowchart renderer
  mermaid-js#5237 Fixes from comments
  Adding elk test
  chore(deps): update eslint
  ...
@sidharthv96 sidharthv96 force-pushed the 4175Issue-allowSemicolons branch from 0e56359 to f63eb45 Compare August 20, 2024 08:48
@sidharthv96 sidharthv96 enabled auto-merge August 20, 2024 08:56
@sidharthv96 sidharthv96 added this pull request to the merge queue Aug 20, 2024
Merged via the queue into mermaid-js:develop with commit 04c29e2 Aug 20, 2024
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to escape : in timeline
2 participants