-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
feat: enhance text splitting with Intl.Segmenter support #5942
feat: enhance text splitting with Intl.Segmenter support #5942
Conversation
|
❌ Deploy Preview for mermaid-js failed.
|
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #5942 +/- ##
==========================================
- Coverage 4.67% 4.66% -0.01%
==========================================
Files 373 373
Lines 51680 51696 +16
Branches 586 586
==========================================
Hits 2414 2414
- Misses 49266 49282 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎ Waiting for the first build to start… |
…ttps://github.com/mRcOol7/mermaid into feature/improve-text-splitting-with-intl-segmenter
This PR does absolutely nothing mentioned in the description. It just adds a bunch of comments, probably by an LLM, and downgrades dependencies. Seems like Hacktober fest has started. |
📑 Summary
This PR enhances the text splitting functionality by incorporating support for
Intl.Segmenter
. This improvement allows for more accurate segmentation of text into graphemes and words, providing a better user experience in applications that require text manipulation.Resolves #4408
📏 Design Decisions
The implementation utilizes
Intl.Segmenter
to split strings into graphemes and words more effectively than previous methods. IfIntl.Segmenter
is not available, it falls back to traditional character and space-based splitting. This ensures compatibility across different environments and improves overall performance.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.