Skip to content

Commit 79c3097

Browse files
committed
docs(widgets): drop stale sphinx/html5.py line ref from test comment
The comment in ``_sphinx_native_html`` cited ``writers/html5.py:626-629`` which drifted relative to the installed Sphinx 8.2.3 (actual: ``visit_literal_block`` at 589, ``highlight_block`` call at 603, ``'</div>\n'`` append at 614). Drop the line-number suffix and keep the class-plus-method anchor -- the latter is a stable API reference that won't rot. (``_base.py``'s matching reference was updated in the non-HTML-builder commit.)
1 parent 5749a07 commit 79c3097

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

tests/docs/test_widgets.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,9 @@ def _sphinx_native_html(
287287
(srcdir / "native.rst").write_text(rst, encoding="utf-8")
288288
app.build()
289289
html = (pathlib.Path(app.outdir) / "native.html").read_text(encoding="utf-8")
290-
# Match Sphinx's highlight wrapper (writers/html5.py:626-629); the two
291-
# trailing ``</div>\n`` (inner Pygments close + outer Sphinx close) anchor
292-
# the end of the block.
290+
# Match Sphinx's highlight wrapper produced by
291+
# ``HTML5Translator.visit_literal_block``; the two trailing ``</div>\n``
292+
# (inner Pygments close + outer Sphinx close) anchor the end of the block.
293293
pattern = re.compile(
294294
rf'<div class="highlight-{re.escape(language)} notranslate">'
295295
r".*?</div>\n</div>\n",

0 commit comments

Comments
 (0)