Skip to content

fix(html): exit raw text mode after a self-closing raw text element - #3730

Open
drakeo338 wants to merge 1 commit into
solidjs:nextfrom
drakeo338:claude/3729-fix
Open

drakeo338 wants to merge 1 commit into
solidjs:nextfrom
drakeo338:claude/3729-fix

Conversation

@drakeo338

Copy link
Copy Markdown

Fixes #3729.

Summary

After a self-closing raw text element such as <textarea />, the tokenizer stayed in raw text mode and treated the rest of the template as text. The self-closing check only looked two tokens back, so it missed the / directly before >. This also checks the previous token.

How did you test this change?

Added tests in packages/html/test/tokenize.test.ts and parse.test.ts; they fail before the fix. vitest run test/tokenize.test.ts test/parse.test.ts in packages/html: 123 passed, 0 failed.

Not run: pnpm build, full pnpm test, prettier.

…olidjs#3729)

<textarea /> put the tokenizer in raw text mode because only the token
before the last was checked for a slash, so the rest of the template was
read as text. Check the last token as well; closing tags still have
their slash second to last.

Fixes solidjs#3729
@changeset-bot

changeset-bot Bot commented Sep 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: f0af93d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 12 packages
Name Type
@solidjs/html Patch
test-integration Patch
@solidjs/babel-plugin Patch
@solidjs/compiler Patch
@solidjs/diagnostics Patch
@solidjs/element Patch
@solidjs/h Patch
@solidjs/signals Patch
solid-js Patch
@solidjs/universal Patch
@solidjs/web Patch
todos-server-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@codspeed

codspeed Bot commented Sep 30, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 185 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing drakeo338:claude/3729-fix (f0af93d) with next (b0c8489)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

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.

1 participant