-
Notifications
You must be signed in to change notification settings - Fork 12
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
Italic gets replaced by underscore characters if only parts of words are italic #324
Comments
I'm not exactly sure where the issue lies, but it's most likely related to the new HTML Serializer (ref). Might be worth checking if the old implementation exhibited this issue or not. Also worth noting that if |
Sharing our Japanese translator's findings on this in case it provides some valuable info.
Reported in TD copy/bugs reports |
@Doist/frontend-hero Wanted to share with you that our Japanese translator tried using underscore (_) before and after the Japanese text, but unfortunately the text remains as is. For English text, they are able to make it italic using underscore. |
Indeed, I rolled back to b1b6cfd and it had the same bug. This happens when the italic underscore is in the middle of a word, both Some solutions for the problem: A: Change the option
|
I believe this happens because This can be fixed by creating an extension. |
Hey @thales-fukuda, thank you for showing in interesting in fixing this issue 🙏 Just so I understand solution C, it's basically the same one as A, but in a form of a plugin without changing I'm a bit torn between A and C, to be honest. I don't necessarily consider A to be a breaking change because the Markdown output should not be relevant most of the time, it's just the format used to store the content (that you shouldn't directly manipulate, at least in the context that we used Typist at Doist), but as long as parsing the input/output remains the same, and everything works as expected (and it does), I don't consider it a breaking change. What are your thoughts on that, @thales-fukuda? What about yours, @engfragui? Would love some extra input from someone on the team :)
I'd be happy to review the PR, but let's first agree on a solution first 👍
As for this one, I believe this should be fixed upstream on Tiptap, and not on Typist. |
Correct. I was not sure about how you guys work with it internally, but if it's not a problem, changing the markdown serializer option would do it. Also, I was looking at Tiptap issues and apparently, there maybe a problem with Japanese, Chinese, and maybe other Asian IMEs (ueberdosis/tiptap#4499). There is no exploration further into it but it's a good idea to keep a look. |
@thales-fukuda Natalie from our team got assigned to this issue internally, so she took care of it. Thank you so much for your amazing contribution, which really helped to reach a solution sooner rather than later. |
🎉 This issue has been resolved in version 2.1.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Current behaviour
If I change parts of a sentence to italic, the correct/expected parts of the text look italic in the text editor, however once I submit the text an underscore character shows up and those parts of words are not actually rendered as italic:
249099120-129b2f25-5e6c-43b5-9742-0758b9bf7988.mp4
Expected behaviour
The text appears as italic even after submitting the text (and no underscores appear).
The text was updated successfully, but these errors were encountered: