diff --git a/bin/loop-claude b/bin/loop-claude index 23346a99..267d41e9 100755 --- a/bin/loop-claude +++ b/bin/loop-claude @@ -79,12 +79,13 @@ JUDGE_SCHEMA = { def sections(text): - found, current = {}, None + found, current, fenced = {}, None, False for line in text.splitlines(): - if line.startswith("## "): + fenced ^= line.startswith("```") + if not fenced and line.startswith("## "): current = line.strip()[3:] found[current] = [] - elif line.startswith("#"): + elif not fenced and line.startswith("#"): current = None elif current and line.strip(): found[current].append(line)