Skip to content
2 changes: 1 addition & 1 deletion web_src/js/markdown/anchors.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ function scrollToAnchor() {
}

export default function initMarkdownAnchors() {
if (!document.querySelector('.markdown')) return;
if (!document.querySelector('.markup')) return;
Copy link
Member

@silverwind silverwind Apr 19, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also need to update headingSelector a few lines above. The fact that this change was necessary makes me suspicious thought, because I thought we'd have both classes present, e.g. markup markdown.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping both classes was my original proposition, but it was decided against because of duplication. #12261 (comment)


for (const heading of document.querySelectorAll(headingSelector)) {
const originalId = heading.id.replace(/^user-content-/, '');
Expand Down