Skip to content

Fix hashtag regex blocking transform to heading - #5376

Merged
acywatson merged 2 commits into
meta:mainfrom
2wheeh:hashtag-regex
Feb 19, 2024
Merged

acywatson merged 2 commits into
meta:mainfrom
2wheeh:hashtag-regex

Conversation

@2wheeh

@2wheeh 2wheeh commented Dec 12, 2023 •

Copy link
Copy Markdown
Contributor

Fixes #5366

This prevents multiple hash chars on hashtag, which blocks transformation to heading.

before:

https://github.com/facebook/lexical/issues/5366#:~:text=The%20current%20behavior-,before,-%2Dheading%2D01.mov

after:

after-hash-regex-2.mov

@vercel

vercel Bot commented Dec 12, 2023 •

Copy link
Copy Markdown

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

Name Status Preview Comments Updated (UTC)
lexical ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2023 9:09pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 20, 2023 9:09pm

@2wheeh

2wheeh commented Dec 28, 2023

Copy link
Copy Markdown
Contributor Author

I thought additional coupling between @lexical/markdown and @lexical/hashtag wouldn't be welcomed so I closed #5368.
But now on my second thought, It could be better than modifying regex when considering the existing services depending on lexical.

I would greatly appreciate it if you could advise me which is correct approach @acywatson

@acywatson

Copy link
Copy Markdown
Contributor

I thought additional coupling between @lexical/markdown and @lexical/hashtag wouldn't be welcomed so I closed #5368. But now on my second thought, It could be better than modifying regex when considering the existing services depending on lexical.

I would greatly appreciate it if you could advise me which is correct approach @acywatson

Sorry for the delay....this seems right to me!

@acywatson
acywatson merged commit 49c34ec into meta:main Feb 19, 2024
@2wheeh
2wheeh deleted the hashtag-regex branch February 20, 2024 01:09
acywatson added a commit that referenced this pull request Feb 20, 2024
@2wheeh
2wheeh restored the hashtag-regex branch February 20, 2024 16:20
@2wheeh
2wheeh deleted the hashtag-regex branch February 21, 2024 03:18

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 5a48f10d Deployed Dec 20, 2023 by vercel[bot]
Preview – lexical — 5a48f10d Deployed Dec 20, 2023 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Hashtag blocks transformation to Headings

3 participants