diff --git a/src/core/issues-notes.js b/src/core/issues-notes.js index 281c01c484..b21c50bede 100644 --- a/src/core/issues-notes.js +++ b/src/core/issues-notes.js @@ -280,7 +280,7 @@ function makeIssueSectionSummary(issueList) { ) { issueSummaryElement.insertAdjacentHTML( "afterbegin", - `

${l10n.issue_summary}

` + `

${l10n.issue_summary}

` ); } } diff --git a/src/dini/conformance.js b/src/dini/conformance.js index a418bc9b4b..9cfe772050 100644 --- a/src/dini/conformance.js +++ b/src/dini/conformance.js @@ -66,7 +66,7 @@ function processConformance(conformance, conf) { ); const plural = terms.length > 1; const content = html` -

${l10n.conformance}

+

${l10n.conformance}

${l10n.normativity}

${terms.length ? l10n.keywordInterpretation(keywords, plural) : null} `; diff --git a/src/w3c/conformance.js b/src/w3c/conformance.js index a7ddd0a1c2..202de42c9c 100644 --- a/src/w3c/conformance.js +++ b/src/w3c/conformance.js @@ -66,7 +66,7 @@ function processConformance(conformance, conf) { ); const plural = terms.length > 1; const content = html` -

${l10n.conformance}

+

${l10n.conformance}

${l10n.normativity}

${terms.length ? l10n.keywordInterpretation(keywords, plural) : null} `; diff --git a/tests/spec/core/markdown-spec.js b/tests/spec/core/markdown-spec.js index c83ad1bca6..56013cf00c 100644 --- a/tests/spec/core/markdown-spec.js +++ b/tests/spec/core/markdown-spec.js @@ -575,4 +575,73 @@ function getAnswer() { expect(p.localName).toBe("p"); }); }); + + it("retains heading order with generated sections", async () => { + const body = ` +
+ Some abstract. +
+ +
+ Status. +
+ + # First section + + This paragraph MUST. + + + + ## Sub section + + This is sub-section paragraph. + + + +
+
Figure caption
+
+ +
+
+
+
+
+ # Acknowledgements + + Thanks to everyone. +
+
+ + + + `; + const ops = makeStandardOps({ format: "markdown" }, body); + ops.abstract = null; + const doc = await makeRSDoc(ops); + const headings = doc.querySelectorAll("body > section > h2"); + const headingTitles = [ + "Abstract", + "Status of This Document", + "1. First section", + "2. Conformance", + "3. Issue summary", + "4. Best Practices Summary", + "5. List of Figures", + "A. Acknowledgements", + "B. IDL Index", + "C. References", + ]; + expect(headings).toHaveSize(headingTitles.length); + for (const heading of headings) { + const title = heading.textContent.trim(); + expect(title).toContain(headingTitles.shift()); + } + }); });