Skip to content

fix(typedoc): add spaces in generics to prevent markdown HTML parsing#113

Merged
avivkeller merged 1 commit into
webpack:mainfrom
moshams272:fix/markdown-html-escaping
Jun 2, 2026
Merged

fix(typedoc): add spaces in generics to prevent markdown HTML parsing#113
avivkeller merged 1 commit into
webpack:mainfrom
moshams272:fix/markdown-html-escaping

Conversation

@moshams272

@moshams272 moshams272 commented May 30, 2026

Copy link
Copy Markdown
Contributor

Added spaces inside angle brackets for generic types (e.g., < Type >), and the doc-kit will remove them. This standard workaround prevents markdown parsers (remark from doc-kit) from falsely interpreting these types as raw HTML tags and stripping them from the AST.

Before:
Screenshot from 2026-05-30 15-34-09

After:
Screenshot from 2026-05-30 15-36-15

Added spaces inside angle brackets for generic types (e.g., `< Type >`).
This standard workaround prevents markdown parsers (remark from doc-kit) from falsely interpreting these types as raw HTML tags and stripping them from the AST.
@vercel

vercel Bot commented May 30, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
webpack-doc-kit Ready Ready Preview, Comment May 30, 2026 12:41pm

Request Review

@avivkeller

Copy link
Copy Markdown
Member

is this blocked by nodejs/doc-kit#814?

@moshams272

moshams272 commented May 30, 2026

Copy link
Copy Markdown
Contributor Author

This PR result is Readonly< object > without linking as node.js/doc-kit ignore it, and with the PR in node.js/doc-kit it will not ignore it and will show links without any spaces as it tirm them, then the result will be the second image in the description of this PR

@avivkeller avivkeller left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

As long as doc-kit is fine parsing the spaces, and it doesn't interfere, LGTM

@avivkeller avivkeller merged commit 76ad6e6 into webpack:main Jun 2, 2026
4 checks passed
@moshams272 moshams272 deleted the fix/markdown-html-escaping branch June 2, 2026 12:26
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