[Bug]: Typography converts parts of dates into fractions #4663
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
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½
but1/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?
Are you sponsoring us?
The text was updated successfully, but these errors were encountered: