Skip to content

feat: ignore <style> tag content in markdown#5

Merged
SoonIter merged 1 commit into
v18from
feat/ignore-style-dom-v18
May 21, 2026
Merged

feat: ignore <style> tag content in markdown#5
SoonIter merged 1 commit into
v18from
feat/ignore-style-dom-v18

Conversation

@SoonIter
Copy link
Copy Markdown
Owner

Summary

Testing

  • pnpm install --frozen-lockfile
  • pnpm test
  • pnpm exec biome check .
  • pnpm build

Copilot AI review requested due to automatic review settings May 21, 2026 09:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Backports behavior to React 18 branch so <style> nodes are skipped during Markdown serialization, preventing CSS from leaking into SSG-MD output.

Changes:

  • Update the Markdown serializer to omit <style> elements from output.
  • Refactor child-Markdown generation to be lazily evaluated.
  • Add a React 18 regression test ensuring <style> content is ignored.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
src/react/render.ts Adds style handling to return empty output and refactors child markdown computation to be lazy.
src/react/render.test.tsx Adds an inline snapshot regression test asserting <style> content is omitted.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/react/render.ts
@SoonIter SoonIter force-pushed the feat/ignore-style-dom-v18 branch from 240c67f to 9231c4e Compare May 21, 2026 10:01
@SoonIter SoonIter merged commit ecf2d0e into v18 May 21, 2026
1 check passed
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.

2 participants