Skip to content

Article export drops repeated headings and paragraphs #58

Description

@wolfgang-aura

Impact: an Article export silently drops any text block whose HTML matches an earlier one. Repeated subheadings ("Pros", "Cons", "Example", "Summary"), a repeated one-line verdict, and a paragraph that matches an earlier list item disappear from both the HTML and the .llm.md. Nothing reports the loss, because the strict gate checks quotes and media, not text.

Where: buildModelForArticle in sourcecapsule.user.js keeps one seenText set for the whole article (line 2749) and returns early on seenText.has(key) in pushTextBlock, pushListBlock and pushBlockquoteBlock. Candidates are already deduped by node identity (seenCandidateNodes), and list items are consumed into their list, so the text set only ever rejects distinct nodes. It has been there since the v0.5.0 initial commit with no stated reason.

Evidence: Node + jsdom repro against the engine export. An article comparing two laptops, each with "Pros" and "Cons" h3 subheadings, goes in as 12 rich-text blocks and comes out as 8:

H3 Laptop A / H3 Pros / P Great battery. / H3 Cons / P Heavy. / L Price: 999 / H3 Laptop B / P Light.

Laptop B's "Pros" and "Cons" headings and a paragraph matching an earlier bullet are gone.

Environment: main 72777ef (v1.6.8). Engine loaded in Node through the module.exports guard with jsdom. No browser.

Next action: remove the text-equality skip, since node identity already prevents double pushes. If X is known to double-render a block, limit the skip to adjacent identical blocks. Add a dom test with repeated subheadings.

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions