fix(board): track an open HTML comment through to its closer
Skipping lines that START with the comment opener is not the same as skipping a comment. Every continuation line of a wrapped comment under the NESTE heading still looked like prose, so the excerpt became comment internals instead of the next step. Both the board line and the route line wrap easily; measured, 1 of 28 repos was affected, with the symptom held down only by the convention of keeping those comments one-line. An open comment is now tracked to its closer, and a NESTE block that is nothing but a comment reports an empty block rather than promoting the comment's own text. Two limits are the format, not leftovers: an HTML comment body may not contain the closer at all, so a rationale quoting it still ends its own comment early. The fixture is the real shape - one-line, wrapped, one-line, prose - because a lone wrapped comment passes even with a flag that never resets, and the continuation marker sits at the start of its line because the table's 38-char cut would otherwise truncate it away and the check would pass against the broken code too. board-selftest 138 -> 142. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014K262DRWBJzEpWoMsBjB8J
This commit is contained in:
parent
d0a5ffe515
commit
123d40e4b4
10 changed files with 96 additions and 10 deletions
|
|
@ -274,11 +274,21 @@ printf '%s\n' "$REPOS" | while IFS= read -r d; do
|
|||
# the heading itself; strip markdown bold/bullet noise. Anchored to the
|
||||
# heading form (measured 26/27 real repos, decided 2026-08-02) so a prose
|
||||
# line that merely mentions the word is never mistaken for the marker.
|
||||
#
|
||||
# A comment is tracked to its CLOSER, not just recognised on its opening line.
|
||||
# Skipping only lines that start with the opener left every continuation line
|
||||
# of a wrapped comment looking like prose, so the excerpt became comment
|
||||
# internals - the board line and the route line both wrap easily, and this
|
||||
# repo was the one of 28 that hit it, held down only by writing them on one
|
||||
# line. What this does NOT do, and cannot: an HTML comment body may not
|
||||
# contain the closer at all, so a route rationale that quotes it still ends
|
||||
# its own comment early. That is the format, not a defect left here.
|
||||
neste="$(awk '
|
||||
/^#+[[:space:]].*NESTE/ { flag=1; next }
|
||||
flag {
|
||||
if (incomment) { if ($0 ~ /-->/) incomment=0; next }
|
||||
if ($0 ~ /^[[:space:]]*$/) next
|
||||
if ($0 ~ /^[[:space:]]*<!--/) next
|
||||
if ($0 ~ /^[[:space:]]*<!--/) { if ($0 !~ /-->/) incomment=1; next }
|
||||
if ($0 ~ /^#/) next
|
||||
print; exit
|
||||
}' "$state" 2>/dev/null \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue