Skip to content

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

Merged
SoonIter merged 1 commit into
mainfrom
fix/ignore-style-dom
May 21, 2026
Merged

feat: ignore <style> tag content in markdown#3
SoonIter merged 1 commit into
mainfrom
fix/ignore-style-dom

Conversation

@SoonIter
Copy link
Copy Markdown
Owner

Summary

  • Ignore <style> nodes during Markdown serialization so CSS content is omitted from SSG-MD output.
  • Add a regression test for <style> handling.
  • Document <style> behavior in the supported elements table.

Testing

  • pnpm test
  • pnpm exec biome check .
  • pnpm build

Copilot AI review requested due to automatic review settings May 21, 2026 08:10
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

This PR updates the React-to-Markdown serializer to omit <style> content from generated Markdown output, preventing embedded CSS from appearing in SSG-MD output. It also adds a regression test and documents the behavior in the README.

Changes:

  • Ignore <style> nodes during Markdown serialization.
  • Add a regression test ensuring <style> content is omitted.
  • Document <style> as an ignored element in the supported-elements table.

Reviewed changes

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

File Description
src/react/render.ts Adds a serializer branch to ignore <style> nodes.
src/react/render.test.tsx Adds a regression test asserting <style> content is not included in output.
README.md Documents that <style> is ignored in Markdown output.

💡 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 fix/ignore-style-dom branch from 426cebe to e3773cb Compare May 21, 2026 09:19
@SoonIter SoonIter changed the title fix: ignore style tag content in markdown feat: ignore <style> tag content in markdown May 21, 2026
@SoonIter SoonIter merged commit a91e04f into main May 21, 2026
3 checks passed
SoonIter added a commit that referenced this pull request May 21, 2026
## Summary

- Backport #3 to the v18 branch.
- Ignore `<style>` nodes during Markdown serialization so CSS content is
omitted from SSG-MD output.
- Add a regression test for `<style>` handling on React 18.

## Testing

- `pnpm install --frozen-lockfile`
- `pnpm test`
- `pnpm exec biome check .`
- `pnpm build`
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