Skip to content

Update Deno documentation scraper#2681

Open
srpatcha wants to merge 2 commits into
freeCodeCamp:mainfrom
srpatcha:chore/add-gitattributes
Open

Update Deno documentation scraper#2681
srpatcha wants to merge 2 commits into
freeCodeCamp:mainfrom
srpatcha:chore/add-gitattributes

Conversation

@srpatcha

Copy link
Copy Markdown

Changes

chore: add .gitattributes for line ending normalization

Ensure consistent line endings and proper diff handling
for text and binary files.

Signed with GPG.

Ensure consistent line endings and proper diff handling
for text and binary files.
@srpatcha
srpatcha requested a review from a team as a code owner April 25, 2026 02:42
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>
@simon04 simon04 changed the title chore: add .gitattributes for line ending normalization Update Deno documentation scraper May 26, 2026
@simon04

simon04 commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

The scraper needs fine tuning:

image image

@srpatcha

Copy link
Copy Markdown
Author

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:

  1. Residual navigation/UI chrome that isn't being stripped by the current clean_html selectors
  2. Code block language detection could be more accurate

I'll iterate on the clean_html.rb and entries.rb filters to clean up the rendering. Could you confirm which Deno docs section/URL the screenshots were captured from so I can target the exact page structure when tuning the selectors? That will help me verify the fixes against the same pages you're seeing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants