Development record
Four leading-comment locators each keep a private walk over HTML comments instead of mdrecord's reading: site/sections.go frontmatterLead, lint/lint.go frontmatterOpen, glossary/index.go frontmatterOpen and reading's displacedFrontmatter. The first three read any line starting with a comment opener and ending with a closer as one whole comment, so a line holding a comment, then prose, then a closer is skipped as a comment and a frontmatter block below it is found where every renderer sees prose first. reading's walk is fail-closed (it refuses a displaced block) but is still a fourth spelling of the same locator.
Four leading-comment locators each keep a private walk over HTML comments instead of mdrecord's reading: site/sections.go frontmatterLead, lint/lint.go frontmatterOpen, glossary/index.go frontmatterOpen and reading's displacedFrontmatter. The first three read any line starting with a comment opener and ending with a closer as one whole comment, so a line holding a comment, then prose, then a closer is skipped as a comment and a frontmatter block below it is found where every renderer sees prose first. reading's walk is fail-closed (it refuses a displaced block) but is still a fourth spelling of the same locator.
Grounds
- pursued: a line holding a comment, prose and a closer is content to site, lint and glossary (TestFrontmatterLeadReadsContentAfterACommentCloser, TestFrontmatterOpenReadsContentAfterACommentCloser in lint and glossary), a multi-line comment is still skipped, and the site, lint, glossary, reading and mdrecord packages pass; a frontmatter block found below a prose line, or a regression in any of those packages, would show it wrong
Frontmatter
| id | iss-2609251518418878 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2609251518418878-four-leading-comment-locators-each-keep.md
open on GitHub ↗ · commit history ↗