Skip to content

feat(richtext-lexical): support escaping markdown characters #11784

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

Merged
merged 4 commits into from
Mar 20, 2025

Conversation

AlessioGr
Copy link
Member

@AlessioGr AlessioGr commented Mar 19, 2025

Fixes #10289 and #11772

This adds support for escaping markdown characters. For example, \* is supposed to be imported as * and exported back to \*.

Equivalent PR in lexical repo: facebook/lexical#7353

@AlessioGr AlessioGr requested a review from GermanJablo March 20, 2025 00:52
@AlessioGr AlessioGr linked an issue Mar 20, 2025 that may be closed by this pull request
@GermanJablo
Copy link
Contributor

I know this is urgent to fix our docs, but it would be nice if once facebook/lexical#2715 is merged, we could get rid of this code.

It's easy to forget to do that. I suggest not closing #10289 yet and leaving an explanatory comment there.

@AlessioGr
Copy link
Member Author

once facebook/lexical#2715 is merged, we could get rid of this code.

There is one other blocker that prevents us from getting rid of this code: @lexical/markdown still depends on @lexical/code, which will break node when executed from a standalone script

@AlessioGr AlessioGr merged commit 43cdccd into main Mar 20, 2025
78 checks passed
@AlessioGr AlessioGr deleted the feat/lexical-mdx-escaping branch March 20, 2025 16:29
Copy link
Contributor

🚀 This is included in version v3.29.0

kendelljoseph pushed a commit that referenced this pull request Mar 31, 2025
Fixes #10289 and
#11772

This adds support for escaping markdown characters. For example,` \*` is
supposed to be imported as `*` and exported back to `\*`.

Equivalent PR in lexical repo:
facebook/lexical#7353
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unwanted characters in docs after Prettier lexical: Can't backslash escape markdown characters
2 participants