Answer the third round: split rank, check decision citations both ways, one fence rule, prose fixes
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import pathlib
|
||||
import re
|
||||
|
||||
from loop_claude.stop import Stop
|
||||
|
||||
FENCE = re.compile(r"^ {0,3}(```|~~~)", re.M)
|
||||
|
||||
|
||||
def read_premises(root: str) -> str | Stop:
|
||||
try:
|
||||
@@ -26,7 +29,7 @@ def sections(text: str) -> dict[str, list[str]]:
|
||||
blocks: list[tuple[str | None, list[str]]] = []
|
||||
fenced = False
|
||||
for line in text.splitlines():
|
||||
fenced ^= line.startswith("```")
|
||||
fenced ^= bool(FENCE.match(line))
|
||||
if not fenced and line.startswith("## "):
|
||||
blocks.append((line.strip()[3:], []))
|
||||
elif not fenced and line.startswith("# "):
|
||||
|
||||
Reference in New Issue
Block a user