Repository navigation
ci: rename - #59
Closed
saturley-hall wants to merge 2 commits into
Closed
ci: rename#59saturley-hall wants to merge 2 commits into
saturley-hall wants to merge 2 commits into
Conversation
dagil-nvidia
added a commit
that referenced
this pull request
Jul 15, 2026
Bug 1 — comment bodies were displayed as raw text. Request GitHub's server-rendered HTML via `Accept: application/vnd.github.full+json` (returns `body_html` alongside `body`) and inject the sanitized HTML in commentHtml(). Every card — inline review, revision discussion, design discussion — now shows bold, italic, inline code, fenced code, links, lists, blockquotes, and headings. - ghGet() sends the "full" media type header. - sanitizeHtml() is a pure regex pass that strips <script>, <iframe>, <object>, <embed>, <style>, <link>, <meta>, <base>, <svg>, <math>, <form>; drops any on*= handler attribute; neutralizes javascript:, data:, and vbscript: URIs on href/src/xlink:href. - hardenLinks() then walks the parsed DOM and sets target="_blank" rel="noopener noreferrer" on every anchor in each rendered card (mount + per-anchor cards), so external links always open in a new tab regardless of how GitHub emitted the anchor. - commentHtml() falls back to the previous plaintext-in-<p> wrapper when body_html is absent (offline fixtures, legacy payloads). - Anchoring, 💬 badge placement (including the hyperlink-anchor fix), and bot filtering (user.type === "Bot" || login endsWith "[bot]") are all unchanged. Bug 2 — cards had a lot of vertical whitespace. Tightened the inline CSS (which is where the DEP card styles live, injected by the runtime per the "single source" note in the file header; fern/main.css hosts the shared NVIDIA theme vars the card colors resolve against): - .dep-pr-card margin 6/0/12 -> 2/0/8, padding 9/11 -> 8/11/7. - .dep-pr-card-eyebrow bottom gap 6 -> 3. - .dep-pr-comment separator margin+padding 9/9 -> 6/6. - .dep-pr-comment-head bottom gap 3 -> 1. - .dep-pr-body line-height 1.45 -> 1.4, paragraph gap 4 -> 3. - .dep-pr-link top gap 4 -> 2. - New compact rules for the markdown surfaces (headings/ul/ol/li/ blockquote/code/pre/a/img/.highlight) keep body_html tight without bleeding into the surrounding DEP prose. Tests: fern/js/test_dep_pr_comments.mjs — 13 cases exercising sanitizeHtml() (strips script/iframe/object/embed/style/link/meta/ base/svg/math/form; drops on*= handlers; neutralizes js:/data:/ vbscript: URIs; preserves code/blockquote/list/http-href/mailto/ relative; handles null/empty; passes real ryanolson comments #7 and #59 verbatim). Run via `node fern/js/test_dep_pr_comments.mjs`. Verified locally: node --check passes; sanitizer tests 13/13; fern check reports 0 errors and 1060 pre-existing warnings (unchanged). Signed-off-by: Dan Gil <[email protected]>
This branch had an error being deployed
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.
Overview:
Details:
Where should the reviewer start?
Related Issues: (use one of the action keywords Closes / Fixes / Resolves / Relates to)