mirror of
https://github.com/affaan-m/ECC.git
synced 2026-11-23 16:25:30 +00:00
Address review feedback on PR #2679: collectEnforcedAnchors had no fence awareness, so a spec merely SHOWING the anchor or delta syntax inside a fenced code block or inline code span was collected and validated as if the spec declared it — silent over-constraint (a target file could fail freshness for a spec that never enforced it) or grammar errors on an otherwise-fine file. Both validators now strip fenced code blocks (``` / ~~~) and inline code spans (`...`) before any comment/anchor/marker sweep; fenced blocks are replaced with an equal number of blank lines so line-oriented parsing is unaffected. The documented contract gains one line: code is illustrative, never declarative. Adds fixtures proving: fenced/tilde-fenced/inline example anchors are ignored, fenced unknown-key and ADDED markers are ignored, a fenced anchor does NOT satisfy an Invariant, and freshness only enforces the real anchor.