You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 0b9a049
Browse filesBrowse the repository at this point in the historyBrowse files
Fix TOC highlight for heading ids containing % or :
quarto.js passed each TOC link's data-scroll-target through decodeURI.
An id with a "%" that does not start a valid escape (id="bad%zz") made it
throw, which aborted the rest of the DOMContentLoaded handler, so the TOC
stopped following the scroll position on the whole page.
Two related cases never threw but never matched either: an id with a valid
escape (id="bad%20ok") was only looked up decoded ("bad ok"), and an id
with a colon was looked up with the "\:" CSS escape that
format-html-bootstrap.ts adds to data-scroll-target.
Look the id up as written first (with "\:" unescaped), then decoded, like
the browser resolves a URL fragment, and never let decoding or an invalid
selector throw.
Fixes#15297
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: news/changelog-1.12.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,7 @@ All changes included in 1.12:
19
19
20
20
- ([#9606](https://github.com/quarto-dev/quarto-cli/issues/9606)): Fix `format-links` entries written as `{format, text}` adding a second, default link for the same format instead of renaming its link.
21
21
- ([#15269](https://github.com/quarto-dev/quarto-cli/pull/15269)): Fix `link-external-newwindow` overriding a `target` set explicitly on a link. (author: @mcanouil)
22
+
- ([#15297](https://github.com/quarto-dev/quarto-cli/issues/15297)): Fix the table of contents highlight not following the scroll position when a heading id contains a `%` or a `:`. (author: @chenyangsu)
0 commit comments