Answer the final checks: the decision exemption's wording, info strings never close a fence, one formula length limit

This commit is contained in:
2026-10-02 21:59:57 +02:00
parent 3f0f329ef9
commit 6096f7d279
5 changed files with 9 additions and 8 deletions
+1 -2
View File
@@ -29,12 +29,11 @@ def sections(text: str) -> dict[str, list[str]]:
blocks: list[tuple[str | None, list[str]]] = []
opener = ""
for line in text.splitlines():
# A fence closes only on the opener's character, at least as long.
if fence := FENCE.match(line):
marker = fence.group(1)
if not opener:
opener = marker
elif marker[0] == opener[0] and len(marker) >= len(opener):
elif marker[0] == opener[0] and len(marker) >= len(opener) and not line[fence.end():].strip():
opener = ""
fenced = bool(opener or fence)
if not fenced and line.startswith("## "):