From 500f45b1f7d2a1c9d6fdb367d58d25b09307d60b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20B=C3=B6rjesson?= Date: Wed, 7 Aug 2024 17:08:18 +0200 Subject: [PATCH 1/2] Crystal 1.13.1 --- lib/docs/scrapers/crystal.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index 94da0e29..e5f97eb6 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -2,7 +2,7 @@ module Docs class Crystal < UrlScraper include MultipleBaseUrls self.type = 'crystal' - self.release = '1.11.1' + self.release = '1.13.1' self.base_urls = [ "https://crystal-lang.org/api/#{release}/", "https://crystal-lang.org/reference/#{release[0..2]}/", From a836758a3c3a644e21ca65de959ea7dacbb22c12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jon=20B=C3=B6rjesson?= Date: Wed, 7 Aug 2024 17:08:38 +0200 Subject: [PATCH 2/2] Ignore non-existing paths A bug in crystals doc generation causes the docs to contain links to non-documented and therefore non-existing types. --- lib/docs/scrapers/crystal.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/docs/scrapers/crystal.rb b/lib/docs/scrapers/crystal.rb index e5f97eb6..203d1feb 100644 --- a/lib/docs/scrapers/crystal.rb +++ b/lib/docs/scrapers/crystal.rb @@ -19,6 +19,12 @@ module Docs html_filters.push 'crystal/entries', 'crystal/clean_html' + options[:skip_patterns] = [ + %r{\ACrystal/System/}, + %r{\AIO/Evented.html\z}, + %r{\ARegex/PCRE2.html\z} + ] + options[:attribution] = ->(filter) { if filter.current_url.path.start_with?('/reference/') <<-HTML