Skip to content

Fix PsycNet full-text section extraction - #362

Open
absurd wants to merge 1 commit into
kepano:mainfrom
absurd:fix/psycnet-jump-to-anchor
Open

Fix PsycNet full-text section extraction#362
absurd wants to merge 1 commit into
kepano:mainfrom
absurd:fix/psycnet-jump-to-anchor

Conversation

@absurd

@absurd absurd commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

Reproduction: https://psycnet.apa.org/fulltext/2026-28269-001.html

Summary

  • APA PsycNet wraps full-text article sections in .ftJumpToAnchor. The case-insensitive jumpto partial selector matched that longer class token and removed every body section while leaving unaffected material such as the abstract and references.
  • Require alphanumeric boundaries around jumpto so standalone .jumpto navigation controls are still removed without matching ftJumpToAnchor.
  • Add an anonymized regression fixture that verifies both behaviors and keeps the unaffected content above Defuddle's short-content retry threshold.

Verification

  • Confirmed the fixture fails on main: both anchored body sections disappear while the abstract and references remain.
  • npm test — 444 tests pass.
  • The targeted fixture passes under JSDOM.
  • npm run lint:innerhtml, npm run build, and npm run size pass.
  • Against the rendered PsycNet page, extraction retains 13,533 words and all article sections while removing both genuine Jump to controls.

APA PsycNet wraps article body sections in ftJumpToAnchor. The
unbounded jumpto partial selector matched that class case-insensitively
and removed each section while leaving the abstract and references
behind.

Require alphanumeric boundaries around jumpto so standalone navigation
classes are still removed without matching the longer article-section
token. Add an anonymized fixture that covers both behaviors and stays
above the short-content retry threshold.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant