You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Audit should report a code fence that never closes #199
With #171, the graph loader reads a fenced block that never closes as plain text, so the headings and links after it still count. That gives the correct dependency edge. It also means no tool reports the unclosed fence, while the published chapter page is still corrupted by it.
Found in the final review of #171 at 22d1c02 and reproduced there and on main at cc7e3a8.
Reproduction
A chapter c/ with three articles:
a.md: a statement, then a ```lean line with no closing fence, then ## Depends on with a link to z.md.
b.md: an ordinary article with a closed ```lean block.
z.md: any article.
Run autoform render, autoform check and autoform audit.
Observed
On the chapter page, the opener in a.md pairs with the closing fence in b.md. One code block swallows the end of Alpha's statement box, its dependency list and Beta's whole theorem box.
Before #171 the audit finding did not name the real problem, but it pointed the author at the file.
Expected
autoform audit names the article and says its fence never closes.
Suggested change
_mask_fences_and_comments in autoform_cli/markdown.py already detects the case when it rewinds to the fence's first line. Surface that as a new audit finding, for example unclosed-code-fence.
Correct the sentence in autoform_cli/README.md ("one that never closes is plain text on the page and hides no heading and no dependency link") and the docstring of mask_fences_and_comments. Both hold for a page with one article, not for a chapter page.
Activity