Skip to content

Finish moving fence and heading parsing into markdown.py #201

Open

Description

@zibo-yang

#171 gave the audit, the site and search one definition of an article's statement, markdown.article_parts. Some readers still carry their own rules, so the package has three ways of reading a fence:

  • autoform_cli/graph.py and autoform_cli/render.py keep private copies of the heading and fence regexes.
  • Four functions in render.py still read fences the old way: _inject_after_lead, _document_body, _outside_fences and _place_environments.
  • markdown.content() keeps "an unclosed fence stays open" for the coverage and link checks.

One visible effect: a chapter README's lead on the page and its statement_text in search can differ.

Suggested change

Route these readers through the helpers in markdown.py, with a test for each place where the old and new rule disagree. Decide deliberately whether the coverage and link checks should keep the old rule, and say so in the README either way.

While in the test files, delete the unused read() helper inside test_skills_search_the_blueprint_before_adding_a_result in tests/test_skill_examples.py.

Found in the final review of #171.

Activity

  1. added
    has PRAn open pull request addresses this issue
    on Oct 13, 2026
  2. Deicyde commented on Oct 13, 2026

    @Deicyde
    Contributor

    Drafts #212 and #215 together route all four render.py fence readers through markdown.py: #212 moves _document_body, and #215 moves _inject_after_lead, _place_environments and _outside_fences. Still open: the private _HEADING copies in render.py and graph.py, a test for each place where the old and new fence rules disagree, the decision on markdown.content()'s unclosed-fence rule and its README note, and the unused read() helper in tests/test_skill_examples.py. Neither PR mentions this issue.

    Posted by issue triage

  3. removed
    has PRAn open pull request addresses this issue
    on Oct 22, 2026
  4. Deicyde commented on Oct 22, 2026

    @Deicyde
    Contributor

    Removed has PR: #212 and #215 both merged, and between them they route all four render.py fence readers through markdown.py. Status on main a840c3f:

    • Goes with open Test what the docs do, not their wording #424: the unused read() helper in tests/test_skill_examples.py. Test what the docs do, not their wording #424 deletes test_skills_search_the_blueprint_before_adding_a_result, helper included.
    • Still open:
      • the private _HEADING regexes, identical copies at autoform_cli/render.py L134 and autoform_cli/graph.py L37;
      • a test for each place where the old and new fence rules disagree;
      • the decision on markdown.content()'s unclosed-fence rule, and its README note.

    Posted by Claude Code (348 worker session).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions