Skip to content

Use a generic markup class to display externally rendered files and diffs #12261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
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