Skip to content

Commit

Permalink
fix(core/dfn-index): handle section number refs with .notoc (#4834)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidvishnoi authored Nov 26, 2024
1 parent 7c5a2ee commit 433cdaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/core/dfn-index.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ function getLocalTermSuffix(dfn, type, term = "") {
function appendSectionNumbers() {
const getSectionNumber = id => {
const dfn = document.getElementById(id);
const sectionNumberEl = dfn.closest("section").querySelector(".secno");
const sectionNumberEl = dfn
.closest("section:not(.notoc)")
.querySelector(".secno");
const secNum = ${sectionNumberEl.textContent.trim()}`;
return html`<span class="print-only">${secNum}</span>`;
};
Expand Down

0 comments on commit 433cdaa

Please sign in to comment.