react-native-live-markdown icon indicating copy to clipboard operation
react-native-live-markdown copied to clipboard

Parsing error in codeblock with some characters in the same line after opening triple backticks

Open tomekzaw opened this issue 1 year ago • 1 comments

[react-native-live-markdown] Parsing error: the processed text does not match the original Markdown input. This may be caused by incorrect parsing functions or invalid input Markdown.
Processed input: '"```\nfoo\n```"'
Original input: '"```a\nfoo\n```"', js engine: reanimated

https://github.com/user-attachments/assets/9796f2b3-1e53-44dd-8453-682af241609e

tomekzaw avatar Dec 07 '24 11:12 tomekzaw

Yo 👋 consulted with @BartoszGrajdek on this one, and we came to the conclusion that his PR for codeblocks (https://github.com/Expensify/react-native-live-markdown/pull/456) will solve this bug.

I verified that I do not get this on his branch.

Quick summary of supported codeblocks syntax:

standard codeblock works

Screenshot 2024-12-11 at 13 08 16

we won't allow any text before codeblock opening markup

Screenshot 2024-12-11 at 13 08 22

we won't allow any text directly after codeblock opening markup

Screenshot 2024-12-11 at 13 08 30

However the two examples do not produce any JS errors, so I hope this will solve the issue.

Kicu avatar Dec 11 '24 12:12 Kicu