Skip to content
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

fix: matching of Italic nested within Bold (and avoid crash) #1189

Conversation

pavel-lens
Copy link
Contributor

What does this PR do?

https://lenster.xyz/posts/0x5b8b-0x076f

Render of this post crashes, because it contains string "ENS" which is an Italic nested within Bold and the Regex matches don't work out properly, leaving unclosed <mdItalic2> tag which then corrupts rendered XHML.

Fixes #1187

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How should this be tested?

Checklist

@vercel
Copy link

vercel bot commented Nov 13, 2022

Someone is attempting to deploy a commit to the Lenster Team on Vercel.

A member of the Team first needs to authorize it.

@pavel-lens pavel-lens mentioned this pull request Nov 13, 2022
1 task
@bigint bigint changed the title Fixes #1187 - Fix matching of Italic nested within Bold (and avoid crash) fix: matching of Italic nested within Bold (and avoid crash) Nov 13, 2022
@vercel
Copy link

vercel bot commented Nov 13, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
lenster ✅ Ready (Inspect) Visit Preview Nov 13, 2022 at 3:45PM (UTC)

@bigint bigint enabled auto-merge (squash) November 13, 2022 15:44
@vercel vercel bot temporarily deployed to Preview November 13, 2022 15:45 Inactive
@bigint bigint merged commit b97800c into heyxyz:main Nov 13, 2022
@gitpoap-bot
Copy link

gitpoap-bot bot commented Nov 13, 2022

Congrats, your important contribution to this open-source project has earned you a GitPOAP!

GitPOAP: 2022 Lenster Contributor:

GitPOAP: 2022 Lenster Contributor GitPOAP Badge

Head to gitpoap.io & connect your GitHub account to mint!

Learn more about GitPOAPs here.

@foolo
Copy link
Contributor

foolo commented Nov 13, 2022

@svitekpavel The solution works, but i think it created some new warnings :)

Screenshot_2022-11-13_17-27-05

@bigint
Copy link
Member

bigint commented Nov 13, 2022

@foolo we had this for long 😕

RN we are trying to migrate to lexical #1188 so the editor and renderer will be same

@pavel-lens pavel-lens deleted the bugfix/1187-incorrect-matching-of-bold-and-nested-italic branch November 14, 2022 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client-side exception error
3 participants