Repository navigation
Cleaner article capture: strip in-body clutter, keep section breaks and captions - #608
Open
fredrivett wants to merge 4 commits into
Open
fredrivett wants to merge 4 commits into
fredrivett wants to merge 4 commits into
Conversation
…rticles
Readability lets publisher furniture inside the article body through
("Read More" cards, subscribe prompts, podcast players), drops SVG-only
section dividers as contentless, and flattens classed caption divs into
body paragraphs. A pre-Readability pass now removes blocks whose class
names match a short generic clutter list (guarded so prose, wrappers, the
article itself and tweet markers are never removed), turns dividers and
asterism paragraphs into <hr>, and turns caption divs into <figcaption>,
which the markdown now keeps.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The paragraph after each section break gets a drop cap, and captions sit just under their image in smaller, muted type. Adds an ArticleDetailView story covering a sectioned article. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
A clutter-classed articleBody wrapper, or a divider/caption class on an image itself, slipped past guards that only checked descendants. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The reader's sibling selectors only match while captured markdown still renders breaks and kept captions as paragraph siblings; assert the drop caps and the tight caption gap in the rendered reader. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
Long-form articles were being captured with publisher furniture mid-body ("Read More" cards, subscribe prompts, podcast "Listen on" widgets), with section dividers dropped so sections ran together, and with photo captions rendered as ordinary paragraphs. A new pre-Readability pass (
article-cleanup.ts) removes blocks whose class names match a short generic clutter list — guarded so anything holding prose, a large share of the page's text, the article itself or a tweet marker is kept — turns SVG/empty dividers and* * *paragraphs into<hr>, and turns classed caption divs into<figcaption>(now kept in the markdown). The reader gives the paragraph after each section break a drop cap (our own typography, since source drop caps are mostly CSS-only) and sets captions small, muted and tight under their image.Checklist
.env.example, in-app help,CONTRIBUTING.md, onboarding checklist), or N/A — N/A, no new feature or servicecaptureServerException/ the error boundary, or N/A — N/A, runs inside the existing never-throw extractionlearnskill, or N/A — N/ANotes
Only new captures and re-captures pick this up; existing items keep their stored content. The fixture copies a real magazine layout's structure and class names with placeholder prose. Adds an
Article/ArticleDetailViewstory with aSectionedvariant.🤖 Generated with Claude Code
Summary by cubic
Improves long-form article capture by removing in-body publisher furniture, preserving section breaks, and keeping photo captions.
A pre-Readability cleanup pass now strips "Read More" cards, subscribe prompts, podcast widgets, and other clutter whose class names match a short generic list — guarded so prose, wrappers holding a large share of the page's text, the article itself, and tweet markers are never removed. Empty or SVG-only dividers and
* * *paragraphs become<hr>section breaks, and classed caption divs become<figcaption>elements that survive into the markdown. The reader gives the paragraph after each break a drop cap and renders captions as small, muted text directly under their image.articleBodywrapper, or a divider/caption class on an image, no longer slips through.Written for commit 32f8097. Summary will update on new commits.