Skip to content

Commit f7860e8

Browse files
committed
fix(release-pill): docstring no longer terminates outer HTML comment early
The note at lines 36-42 explained why you should not write literal `<!-- ... -->` inside the docstring, and in doing so, wrote literal `<!-- ... -->` inside the docstring. HTML disallows nested comments, so the inner `-->` token in the warning text closed the outer comment on line 1, leaking the example markup (span and script tags) into the rendered page on every Quarto site that included this snippet via include-after-body. The leaked script tag carries a literal U+2026 ellipsis as part of its src attribute (the docstring abbreviated the path), so every page fetched a 404 for `<subsite>/…release-pill.js`. Rewrites the note to describe the rule without using the literal characters it warns against. The outer comment now opens on line 1 and closes on line 61 with no intermediate delimiters. After this lands, the release-pill 404 disappears across vol1, vol2, tinytorch, kits, mlsysim, and instructors. The actual release-pill JS (inline script at the bottom of this file) was always intact — only the leak from the bad docstring was failing.
1 parent 3511cc6 commit f7860e8

1 file changed

Lines changed: 8 additions & 7 deletions

File tree

shared/release/release-pill.html

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@
3333
3434
(See shared/release/release-pill.js for the standalone JS form.)
3535
36-
NOTE: Do NOT use a nested `<!-- ... -->` HTML comment in this docstring
37-
block. HTML disallows nested comments, so the inner `-->` would
38-
terminate the outer comment early and cause the example markup below
39-
it (the `<span data-release-pill>` and `<script src=…release-pill.js>`)
40-
to leak into the rendered page — producing a 404 on every Quarto site
41-
that includes this snippet via `include-after-body`. Use `//`-style
42-
pseudo-comments inside the documentation block instead.
36+
NOTE: This docstring must not contain literal HTML-comment delimiters
37+
(open or close). HTML disallows nested comments, so an inner close
38+
delimiter would terminate this outer comment early and leak the
39+
example markup below it (the span and script tags) into the rendered
40+
page — producing a 404 on every Quarto site that includes the snippet
41+
via include-after-body. The earlier version of this note tripped that
42+
exact bug; if you need to describe HTML-comment syntax, do it without
43+
using the literal characters.
4344
4445
── Manifest contract ──
4546

0 commit comments

Comments
 (0)