diff --git a/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs b/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs index 21a492062ca6..36e611f13428 100644 --- a/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs +++ b/packages/lexical-playground/__tests__/e2e/Hashtags.spec.mjs @@ -17,6 +17,7 @@ import { focusEditor, html, initialize, + pasteFromClipboard, pressToggleBold, repeat, test, @@ -440,4 +441,27 @@ test.describe('Hashtags', () => { `, ); }); + + test('Should not break with multiple matches', async ({page}) => { + await focusEditor(page); + + const clipboard = {'text/html': '#hello#world#more#next#matches'}; + await pasteFromClipboard(page, clipboard); + + await waitForSelector(page, '.PlaygroundEditorTheme__hashtag'); + + await assertHTML( + page, + html` +
+ + #hello + + #world#more#next#matches +
+ `, + ); + }); });