Development record
The README contents part masks a heading's code spans twice, which is not idempotent. In readme_derive.go, headingText unmasks its result, then anchor (and escapeLinkText) re-run mdrecord.MaskCodeSpans on that output. When the first pass strips an inline tag or a link tail sitting directly between two code spans, the second pass pairs the spans across the join.
The README contents part masks a heading's code spans twice, which is not idempotent. In readme_derive.go, headingText unmasks its result, then anchor (and escapeLinkText) re-run mdrecord.MaskCodeSpans on that output. When the first pass strips an inline tag or a link tail sitting directly between two code spans, the second pass pairs the spans across the join.
The first heading below is listed as the second line, where the forge anchors it #ab and shows two code spans; the third heading gets the right anchor but the merged text. The base before step 3 got these headings wrong too, so it is not a regression.
## `a`<br>` b `
- [`a`` b `](#a-b-)
## `GET`<br>`POST`
Grounds
- pursued: a heading with a tag or link between two code spans is anchored from both spans' rendered text and listed as two spans; the record's example heading, listed as one span or anchored other than #ab, would show it wrong.
Frontmatter
| id | iss-2610112237411831 |
|---|---|
| type | issue |
| lifecycle | resolved |
| severity | minor |
.abcd/work/issues/resolved/iss-2610112237411831-the-readme-contents-part-masks-a-heading.md
open on GitHub ↗ · commit history ↗