From d2db205f8ce906a38c607439a6e733b6565e6be4 Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst <49307154+douden@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:34:22 +0100 Subject: [PATCH 1/2] Fix selector for admonition title in togglebutton.js When the toggleID contains symbols such as `:` an error occurs in JS and all dropdown admonitions after the current element stop functioning. The `CSS.escape` call fixes this. --- sphinx_togglebutton/_static/togglebutton.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_togglebutton/_static/togglebutton.js b/sphinx_togglebutton/_static/togglebutton.js index e88c0e3..4b822bb 100644 --- a/sphinx_togglebutton/_static/togglebutton.js +++ b/sphinx_togglebutton/_static/togglebutton.js @@ -50,7 +50,7 @@ var initToggleItems = () => { // Add click handlers for the button + admonition title (if admonition) admonitionTitle = document.querySelector( - `#${toggleID} > .admonition-title` + `#` + CSS.escape(toggleID) + ` > .admonition-title` ); if (admonitionTitle) { // If an admonition, then make the whole title block clickable From c944f8283c17feee14330deb1848074d6813ec3b Mon Sep 17 00:00:00 2001 From: Dennis den Ouden-van der Horst Date: Fri, 27 Mar 2026 14:45:37 +0100 Subject: [PATCH 2/2] Add 0.4.5 changelog entry Add CHANGELOG entry for 0.4.5 (2026-03-27) noting a fix: corrected the selector for the admonition title in togglebutton.js. --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc3b61..ad2a490 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 0.4.5 - 2026-03-27 + +### Fixed + +- Fix selector for admonition title in togglebutton.js. + ## 0.4.4 - 2026-01-14 ### Fixed