-
Notifications
You must be signed in to change notification settings - Fork 73
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
Quotes inside codeblocks removes all formatting #179
Comments
@viniciusyoshioka Thanks for opening this issue. Would you be able to share with us a screen recording that shows the problem so we have a better understanding on how to reproduce it? |
@tomekzaw Yes, sure! https://github.com/Expensify/react-native-live-markdown/assets/71671043/52ee9a5e-b6a8-4121-ba94-4ea3df15b672 https://github.com/Expensify/react-native-live-markdown/assets/71671043/9998bb19-584c-4a29-96dd-1627090427b0 In "Screen recording 1", I reproduced the problem. After typing some markdown text, I paste another text and then the formatting is not applied in the whole component. While recording, I realized something that can be a real bug, and recorded it in "Screen recording 2". The formatting seems to be working fine, even when pasting text, I'm sorry for not testing more before. But I found what is causing this. Having single or double quotes inside code block (the one with 3 backticks), removes the whole formatting. After erasing the quotes from inside the code block, the formatting returns. |
@viniciusyoshioka Thank you very much for preparing the screen recordings and your investigation. You are right, there is a bug in parsing blockquotes if they contain characters like If there is a bug while parsing Markdown, we simply remove all formatting. This also helps us identify such cases. I believe this has been already adressed by @robertKozik, we will submit a PR with a fix. Thank you! |
MarkdownTextInput
is not formatted
Hi @viniciusyoshioka Once again thanks for reporting this issue! The issue is indeed inside the parser, as to be more precise data inside the codeblock was escaped twice - which was breaking our checks. That leads to remove the formatting. This PR should resolve this problem: #140 |
Hi @robertKozik! I have tested the pull request with every character available in my keyboard and it is working perfectly. Thank you @tomekzaw and @robertKozik for the quick fix! |
Description
When using
MarkdownTextInput
the written text is formatted properly. However, when pasting some markdown text, the pasted text is not formatted. Even if I erase and type again, the text formatting does not update.I didn't find if its intentional, but I believe its not, so I opened the issue.
Platform
This bug is on Android. I can't check if its present on other platforms.
Other details
React Native version: 0.73.4
@expensify/react-native-live-markdown
version: 0.1.5Android's version: 13
JS Engine: Hermes
Archtecture: Old
The text was updated successfully, but these errors were encountered: