Repository navigation
Fix import-source stripping whole Wikipedia pages (#195 regression) - #197
Conversation
…e article #195 matched chrome names like toc with hyphen boundaries, so the <html> flags vector-toc-available and vector-feature-toc-pinned-* marked the whole page as chrome and every Wikipedia import came back empty. Match exact id/class tokens, never treat <html>/<body> as chrome, and test against a real (gzipped) Wikipedia page.
|
Warning Review limit reachedEnable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. Next included review available in 55 minutes. View limit details
ℹ️ Recent review info
📝 Walkthrough
Note 🎁 Summarized by CodeRabbit Free
Comment |
Fixes a regression from #195 (C2 / LB-02): every Wikipedia import returned 422 "This page did not contain enough readable text to import." (found by T7 with the
lib-importrecipe on desktop and mobile).Cause. The new Wikipedia chrome rules in
import-source/html-text.tsmatched names liketocandnoprintwith[\s_-]boundaries, so<html class="... vector-toc-available vector-feature-toc-pinned-clientpref-1 ...">counted as chrome and the whole document was stripped.Fix. Match whole whitespace-separated id/class tokens (Set lookups) for both the chrome list and the article roots, and never treat
<html>/<body>as chrome.Tests.
[edit]links and the language list; plus a synthetic token test. Both fail on main and pass here.lib-importURL: main → 422, this branch → 200 with clean article text.npm run verifyon the VPS: pass (unit 65 files/446, collaboration 5/30, edge 408, e2e smoke 43).Summary by CodeRabbit