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:
Kjell Tore Guttormsen 2026-08-03 09:53:25 +02:00
commit 123d40e4b4
10 changed files with 96 additions and 10 deletions

View file

@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [0.20.1] - 2026-08-03
### Fixed
- **A multi-line HTML comment under the NESTE heading no longer leaks into the
next-step excerpt.** `board.sh` skipped lines that *started* with the comment
opener, which is not the same thing as skipping a comment: every continuation
line of a wrapped comment still looked like prose, so the excerpt became
comment internals — `scope=local; rationale=...` where the next step should
have been. An open comment is now tracked through to its closer. Both the
board line and the route line wrap easily, and the affected repo was this one
(1 of 28 measured), where the symptom was held down only by the convention of
writing those comments on a single line.
Two limits are the format, not leftovers. An HTML comment body may not contain
`-->` at all, so a route rationale that quotes the closer still terminates its
own comment early — no fix here can change that. And a NESTE block consisting
of nothing but a comment now reports an empty block rather than promoting the
comment's own text, which is what it always should have said.
`board-selftest.sh` 138 → 142 checks. The fixture is the real shape on
purpose — one-line comment, wrapped comment, one-line comment, prose — because
a lone wrapped comment would pass even with an open-comment flag that never
resets. The continuation marker sits at the start of its line for the same
reason: further in, the table's 38-character cut would truncate it away and
the check would pass against the broken code too.
## [0.20.0] - 2026-08-03
### Changed