fix: prefer article titles in webfetch#5
Merged
Conversation
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.
Summary
Fixes a Tistory title regression where a blog-level header
<h1>could be chosen before the real article title. The reader-mode fallback now scans title selectors in preferred order, so.tit_postand common article title classes win over generich1chrome.Changes
TITLE_SELECTORSscan.QA / Evidence
npm test: 4 files passed, 37 tests passed.npm run check:tsgo --noEmitandbiome check .passed.Risks
Secret safety
Summary by cubic
Prefer article titles in
webfetchso site-levelh1(e.g., Tistory blog headers) no longer override the real article title. Markdown and text outputs now pick.tit_postand other common article title classes before generich1or the document title.TITLE_SELECTORSandselectPreferredTitle().Readabilityfallback.Written for commit e2fab0c. Summary will update on new commits.
Post-merge Audit Addendum
/Users/yeongyu/local-workspaces/senpi-webfetch-tistory-worktree/local-ignore/qa-evidence/20260626-webfetch-title-selector/pi-webfetch-title-red.txt# 블로그 이름instead of# 티스토리 본문을 읽어야 합니다.npm testpassed 37 tests and CI passed on Ubuntu/macOS Node 20/22.