Update Deno documentation scraper - #2681
Conversation
Ensure consistent line endings and proper diff handling for text and binary files.
Add a new UrlScraper for Deno standard library and runtime documentation (lib/docs/scrapers/deno.rb) with: - Deno docs site scraping (docs.deno.com) - Page parsing with Nokogiri (main/article content extraction) - Link resolution (relative to absolute URL conversion) - Version handling with semver normalization (v2 and v1 support) - Module categorization (Web APIs, I/O, File System, Network, etc.) - Code example extraction with language detection - HTML filter pipeline (clean_html and entries filters) Also includes: - Minitest test class for scraper configuration validation - Bug fix: replace File.open(path).read with File.read(path) in sprites.thor to prevent unclosed file handle leak Signed-off-by: Srikanth Patchava <spatchava@meta.com>
|
Thanks for the review and the screenshots @simon04! You're right that the output needs refinement. From the screenshots I can see a few issues to address:
I'll iterate on the |
Remove source-site navigation and controls that leaked into generated API and runtime pages, while preserving the source language metadata DevDocs uses for syntax highlighting. Add representative regression fixtures for the reviewer-reported page shapes. Test Plan: - Ran the focused Deno suite: 17 runs, 73 assertions, 0 failures. - Ran the remaining Ruby suite excluding two independently failing Windows-only baseline files: 665 runs, 927 assertions, 0 failures. - Compared old and new filters on current Network and @std/fmt source pages; all measured chrome counts dropped to zero while TypeScript, JavaScript, and shell language metadata was preserved. - Ran Ruby syntax checks and git diff --check.
|
@simon04 I pushed d17aafb to address the requested scraper fine-tuning without waiting for the missing source URL. I matched the screenshots to the current pages and validated the previous vs updated filter on both:
The filter now scopes output to Validation:
Re-review is requested because the two issues identified from the screenshots are now covered directly. |


Changes
chore: add .gitattributes for line ending normalization
Ensure consistent line endings and proper diff handling
for text and binary files.
Signed with GPG.