Skip to content

Verify and fix rendering/extraction of the example post's edge cases end-to-end #212

Description

@bbornino

content/fennifith/posts/example/index.md (slug example, author fennifith) is the team's deliberate edge-case post — nested blockquotes containing code blocks, list items containing code blocks, adjacent/overlapping footnotes, emoji in headings and IDs, HTML embeds, deeply nested quotes. It exists specifically to stress-test content handling, but nothing currently confirms that hoof actually handles all of it correctly.

Scope: Run this post through the real pipeline(s) it touches (starting with fetch-post-data.ts's extraction, but not limited to it if other consumers — markdown parsing, sync-post, content API responses — are relevant) and confirm the output is actually correct for every edge case in the post, not just that some test passes. Fix whatever's found to be broken.

Known issue already surfaced: stringifyCodeTree's use of findAllAfter(tree, 0, { tagName: "pre" }) in fetch-post-data.ts only picks up top-level

 elements — it does not descend into ones nested inside blockquotes or list items. Confirmed by running the real extraction against this post: several of its code blocks (the ones inside > quotes and -/1. list items) are silently dropped, and only the last, unnested code block gets included. Need to determine whether this is intentional (only top-level code blocks are meant to feed post-images) or a real gap, and fix accordingly.

Relationship to other issues: #211 covers vendoring this post as a local test fixture and adding baseline test coverage for fetch-post-data.ts — this issue is the deeper pass of actually verifying and fixing correctness across its edge cases, and can reuse #211's fixture once that lands. Not related to #125/PR #209's satori investigation; that stays scoped to the version bump.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions