Skip to content

Revert "Fix hashtag regex blocking transform to heading" - #5636

Merged
acywatson merged 1 commit into
mainfrom
revert-5376-hashtag-regex
Feb 20, 2024
Merged

acywatson merged 1 commit into
mainfrom
revert-5376-hashtag-regex

Conversation

@acywatson

Copy link
Copy Markdown
Contributor

@2wheeh

Unfortunately, I made a mistake here - some Meta surfaces support multiple leading "#" characters in a hashtag, so this would break them. Instead, we might need a generic way to override the regex.

Reverts #5376

@vercel

vercel Bot commented Feb 20, 2024 •

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 Feb 20, 2024 4:00pm
lexical-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 20, 2024 4:00pm

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Feb 20, 2024
@github-actions

Copy link
Copy Markdown

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
packages/lexical/dist/Lexical.js 26.67 KB (0%) 534 ms (0%) 207 ms (+7.36% 🔺) 740 ms
packages/lexical-rich-text/dist/LexicalRichText.js 38.8 KB (0%) 776 ms (0%) 274 ms (-12.54% 🔽) 1.1 s
packages/lexical-plain-text/dist/LexicalPlainText.js 38.77 KB (0%) 776 ms (0%) 337 ms (+35.39% 🔺) 1.2 s

@acywatson
acywatson merged commit 4792ff6 into main Feb 20, 2024
@acywatson
acywatson deleted the revert-5376-hashtag-regex branch February 20, 2024 16:10
etrepum added a commit to etrepum/lexical that referenced this pull request Oct 5, 2026
…ixture

## Description

The Linux Firefox browser run timed out while typing in a hashtag fixture. Its pending input then interleaved with the following test. The native typing command used a live :focus selector, which can stop matching when the browser deactivates the test frame and later resolve to another editor.

Capture the requesting element with a unique temporary selector and let Playwright focus that element before typing. Bound the command to five seconds, below the test timeout, so an unresolved command cannot wait into a later test. Add a two-editor regression that verifies pending input stays with its original editor and preserves Unicode.

Collect Vitest's current .vitest/attachments path in CI as well as the existing artifact paths; the failed Firefox job produced screenshots but uploaded no artifacts.

## Test plan

### Before

CI on 2cd6717:
https://github.com/facebook/lexical/actions/runs/37249685012

Linux Firefox, Hashtags (rich text: false):
```
Should not break with multiple leading "#" meta#5636
Error: Test timed out in 15000ms.
Should not break while skipping invalid hashtags meta#5703
Received: ...#hel...#lwoorld#invalid...
```

New regression against the previous helper and command, Linux WebKit:
```sh
VITEST_BROWSER=webkit node node_modules/vitest/vitest.mjs run --project=browser packages/lexical-playground/src/__tests__/browser/NativeTyping.test.ts
```
```
FAIL pending native input stays with the editor that requested it
AssertionError: expected '' to be 'A🙂B'
Tests 1 failed (1)
```

### After

```sh
VITEST_BROWSER=webkit node node_modules/vitest/vitest.mjs run --project=browser packages/lexical-playground/src/__tests__/browser
```
```
Test Files 19 passed (19)
Tests 142 passed | 1 skipped (143)
Duration 17.02s
```

ESLint, Prettier, TypeScript, and git diff --check passed. Linux Firefox is unavailable locally and is validated in CI.

This branch was successfully deployed

2 active deployments
Preview – lexical-playground — 72f89ba2 Deployed Feb 20, 2024 by vercel[bot]
Preview – lexical — 72f89ba2 Deployed Feb 20, 2024 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.

3 participants