diff --git a/spec/audit.py b/spec/audit.py index 1af03627..19c7e300 100755 --- a/spec/audit.py +++ b/spec/audit.py @@ -478,8 +478,8 @@ def undeclared_h2_headings(text, declared): then holds for any caller, regardless of how its own names are cased or spaced. Scoped to `## ` only, the section model's unit. An H1 title or a nested H3 is not itself a section this check judges. - Fence-aware via unfenced_text. A `## ` line inside a fenced code sample, or a `##`-prefixed - shell comment, is not misread as a real heading. + Fence-aware via unfenced_text. Either a heading-syntax line or a `##`-prefixed shell comment, shown + inside a fenced code sample, is not misread as a real heading. """ h2s = {ln[3:].strip().lower() for ln in unfenced_text(text).split("\n") if ln.startswith("## ")} return sorted(h2s - {d.strip().lower() for d in declared})