Fraction transformations while using Markdown autoformatting doesn't format correctly in some cases
📝 Provide detailed reproduction steps (if any)
- Go to: https://ckeditor.com/docs/ckeditor5/latest/examples/builds-custom/full-featured-editor.html
- Type
`1/2`anywhere in the middle of a paragraph. - Type
`1/2`then space at the end of a paragraph.
https://user-images.githubusercontent.com/773401/197432571-c1f783d1-8f19-479c-94dd-476ea7e0c02f.mp4
✔️ Expected result
Step 2 and step 3 should have inserted "½" (the transformed fraction) formatted as inline code, like this: ½
❌ Actual result
After step 2, the two characters after the cursor are formatted as code and deleted respectively. The closing backtick is not removed.
After step 3, the remainder of the document is formatted as code. The backticks are not removed.
📃 Other details
- Browser: Chrome 106
- OS: Windows 10
- First affected CKEditor version: Unknown
- Installed CKEditor plugins: Default plugins
Additional observations:
- Italics (
*1/2*or_1/2_) also breaks, but breaks differently than inline code depending on if inserting in the beginning, middle, or end of a word. - Bold (
**1/2**or__1/2__) works as expected. It seems like formatting using only a single character has this bug. - This bug only seems to occur when typing the fraction immediately followed by the closing format character. For example, typing
`test 1/2`will trigger this bug, but`1/2 test`works as expected. - This bug seems to only apply to fractions and not other transformations like
(c)->©.
If you'd like to see this fixed sooner, add a 👍 reaction to this post.
Hi mabeyj,
Thanks for bringing this issue to our attention and for the detailed observations.
I was able to reproduce this issue on my end, however, due to our roadmap and priorities, I can't promise any ETA for fixing it.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
This is still relevant; the steps above still reproduce the issue on the latest version of CKEditor. Step 3 is partially fixed: the remainder of the document is no longer reformatted, but backticks are still not removed as seen in the video.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.
This is still relevant; same results as https://github.com/ckeditor/ckeditor5/issues/12719#issuecomment-1781066846 with latest CKEditor.
There has been no activity on this issue for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the solution, leave a comment or reaction under this issue.