Skip to content

Commit f431072

Browse files
committed
Missing quotes around attributes selector
This fixes #9125 as this was causing issues with some specific ids only composed of HTML encoded characters (like russian language headers)
1 parent 4ec1336 commit f431072

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

news/changelog-1.5.md

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ All changes included in 1.5:
88
- ([#8862](https://github.com/quarto-dev/quarto-cli/issues/8862)): Properly deal with an `aside` within a definition list.
99
- ([#8990](https://github.com/quarto-dev/quarto-cli/issues/8990)): Copy button now works for embedded code source in modal window when optin-in `code-tools` feature.
1010
- ([#9076](https://github.com/quarto-dev/quarto-cli/issues/9076)): Fix issue with `layout-ncol` and `column` settings in executable code cells.
11+
- ([#9125](https://github.com/quarto-dev/quarto-cli/issues/9125)): Fix issue in browser console with TOC selection when the document is using ids for headers with specific characters (e.g russian language headers).
1112

1213
## PDF Format
1314

src/resources/formats/html/quarto.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
9494
if (link.href.indexOf("#") !== -1) {
9595
const anchor = link.href.split("#")[1];
9696
const heading = window.document.querySelector(
97-
`[data-anchor-id=${anchor}]`
97+
`[data-anchor-id="${anchor}"]`
9898
);
9999
if (heading) {
100100
// Add the class

0 commit comments

Comments
 (0)