Commit d834713
committed
docs(chore[spa]): drop spa-copybutton-reinit.js shim; gp-sphinx handles it now
The shim was a project-local workaround for two gp-sphinx bugs in
``spa-nav.js::addCopyButtons``: clone-based template failed on pages
without code blocks, and only ``div.highlight pre`` was iterated
(not the full configured ``copybutton_selector``, so prompt blocks
went buttonless after SPA swap).
Both are fixed upstream in gp-sphinx (#20): inline HTML template and
``window.GP_SPHINX_COPYBUTTON_SELECTOR`` bridge. The shim's
responsibilities collapse into the theme's own code, so remove it
from conf.py's ``app.add_js_file`` list and delete the file.
``prompt-copy.js`` stays — it's unrelated: it implements Markdown-
preserving copy (backtick-wrapping ``<code>`` children) for prompt
admonitions, which sphinx-copybutton's ``innerText``-based copy
flattens. That behavior has nothing to do with SPA navigation and
uses document-level event delegation to survive DOM swaps.1 parent b4a01e1 commit d834713
2 files changed
Lines changed: 0 additions & 138 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
142 | 142 | | |
143 | 143 | | |
144 | 144 | | |
145 | | - | |
146 | 145 | | |
147 | 146 | | |
148 | 147 | | |
| |||
0 commit comments