feat: render HTML documents natively in the review UI#14
Open
brendanwhit wants to merge 2 commits into
Open
Conversation
… styles and granular commentable blocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
add_documentwith a.htmlfile currently forces the document through the markdown parser, which mangles it (e.g.<pre>truncates at blank lines) and renders it as one giant non-commentable blob on the dark app theme. This PR renders HTML docs natively:markdownflag, falls back to the.html/.htmfilename.<body>(recursing through container tags likesection/article) so an HTML doc splits into the same ordered, individually-commentable blocks a markdown doc does. Container ids are carried onto the first inner block so TOC anchor links keep resolving.<head><style>rules are re-applied but rescoped to.md-content.html-doc .md-blockvia the CSSOM, so a doc's:root { --bg: … }can't clobber the review UI's theme variables and its rules can't reach the comment chrome. Page-level box properties onbody/:rootare dropped (the review column provides layout).<summary>, buttons) do their native thing; shift+click force-comments anywhere.Tests
npm run lint,npm run format:check,npm run build,npm testall green.Second commit is the
dist/sync.🤖 Generated with Claude Code