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

[Bug]: Typography converts parts of dates into fractions #4663

Closed
1 of 2 tasks
indi-rin opened this issue Dec 2, 2023 · 0 comments
Closed
1 of 2 tasks

[Bug]: Typography converts parts of dates into fractions #4663

indi-rin opened this issue Dec 2, 2023 · 0 comments
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug

Comments

@indi-rin
Copy link

indi-rin commented Dec 2, 2023

Which packages did you experience the bug in?

core, extension-collaboration, extension-collaboration-cursor, extension-focus, extension-gapcursor, extension-history, extension-mention, extension-placeholder, extension-typography, extension-emoji, extension-unique-id, extension-blockquote, extension-bold, extension-bullet-list, extension-color, extension-document, extension-hard-break, extension-heading, extension-image, extension-italic, extension-link, extension-list-item, extension-ordered-list, extension-paragraph, extension-text, extension-text-style, html, pm, react, suggestion

What Tiptap version are you using?

2.1.2 for extension-collabration, extension-collabration cursor, extension-focus, extension-gapcursor, extension-history, extension-mention, extension-placeholder, and extension-typography; 2.1.0 for the other packages

What’s the bug you are facing?

The Typography extension will auto-convert fractions into single-character entities (e.g. 1/2 → ½), which is convenient when actually typing a fraction but a source of frustration when typing dates that begin 1/2, 1/4, or 3/4, as it results in 1/2/2024 being converted into ½/2024.

What browser are you using?

Chrome

Code example

No response

What did you expect to happen?

I would expect the conversion to happen only after adding a space (e.g. 1/2 doesn't convert to ½ but 1/2 does) to ensure that the conversion is only happening for actual fractions and not for dates or other strings that may contain numbers and slashes.

Additionally, it would be a nice feature if the conversion could be undone via undo / cmd+z / ctrl+z. Backspace is not an intuitive undo trigger for many users, who assume they are stuck with the unwanted conversion after attempting to use ctrl+z to undo it.

Anything to add? (optional)

You previously addressed this related ask (thank you!) and while that helps for dates where the convertible "fraction" is contained in the middle of the word, the problem persists if the "fraction" is at the start of the date.

Did you update your dependencies?

  • Yes, I’ve updated my dependencies to use the latest version of all packages.

Are you sponsoring us?

  • Yes, I’m a sponsor. 💖
@indi-rin indi-rin added Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug labels Dec 2, 2023
@bdbch bdbch closed this as completed Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Open Source The issue or pull reuqest is related to the open source packages of Tiptap. Type: Bug The issue or pullrequest is related to a bug
Projects
Status: Done
Development

No branches or pull requests

3 participants