Skip to content

Commit

Permalink
Missing quotes around attributes selector
Browse files Browse the repository at this point in the history
This fixes #9125 as this was causing issues with some specific ids only composed of HTML encoded characters (like russian language headers)
  • Loading branch information
cderv committed Mar 18, 2024
1 parent 4ec1336 commit f431072
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/changelog-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ All changes included in 1.5:
- ([#8862](https://github.com/quarto-dev/quarto-cli/issues/8862)): Properly deal with an `aside` within a definition list.
- ([#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.
- ([#9076](https://github.com/quarto-dev/quarto-cli/issues/9076)): Fix issue with `layout-ncol` and `column` settings in executable code cells.
- ([#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).

## PDF Format

Expand Down
2 changes: 1 addition & 1 deletion src/resources/formats/html/quarto.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ window.document.addEventListener("DOMContentLoaded", function (_event) {
if (link.href.indexOf("#") !== -1) {
const anchor = link.href.split("#")[1];
const heading = window.document.querySelector(
`[data-anchor-id=${anchor}]`
`[data-anchor-id="${anchor}"]`
);
if (heading) {
// Add the class
Expand Down

0 comments on commit f431072

Please sign in to comment.