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

Intl.Segmenter: isWordLike does not match Node.js and browsers #4370

Open
kytta opened this issue Mar 13, 2024 · 5 comments
Open

Intl.Segmenter: isWordLike does not match Node.js and browsers #4370

kytta opened this issue Mar 13, 2024 · 5 comments

Comments

@kytta
Copy link

kytta commented Mar 13, 2024

Which package?

@formatjs/intl-segmenter

Describe the bug

As described in #4184, the value of isWordLike in the output of Segmenter::segment() is almost always true (the exception being newlines). This does not match the behaviour present in Node.js and Chrome (ICU4C), and Firefox Nightly (ICU4X).

To Reproduce

Codesandbox URL

https://codesandbox.io/p/sandbox/dank-smoke-cv9hl7

Reproducible Steps/Repo

Steps to reproduce the behavior:

  1. Make a string with spaces, dashes, etc.
  2. Segment it with Intl.Segmenter in Chrome or Node.js or Firefox Nightly
  3. Segment it with FormatJS' polyfill
  4. Compare

Expected behavior

FormatJS' polyfill matches Intl.Segmenter, in that it marks punctuation as non-word-like

@kytta kytta added the bug label Mar 13, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Apr 13, 2024
@kytta
Copy link
Author

kytta commented Apr 13, 2024

Stop sweeping your bugs under the carpet. Blindly closing tickets helps no one.

@github-actions github-actions bot removed the Stale label Apr 14, 2024
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label May 15, 2024
@kytta
Copy link
Author

kytta commented May 15, 2024

Not stale

@longlho
Copy link
Member

longlho commented May 15, 2024

PR's welcome

@longlho longlho added pinned and removed Stale labels May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants