From e75655ac086c2f1c9dd9d05dc6c7b81ba45e5748 Mon Sep 17 00:00:00 2001 From: Mark Knol Date: Thu, 20 Feb 2020 11:41:43 +0100 Subject: [PATCH 1/2] Update haxe.rb --- lib/docs/scrapers/haxe.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 2dbab01a..892085be 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '3.4.7' + self.release = '4.0.5' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries' @@ -10,7 +10,7 @@ module Docs options[:container] = '.span9' options[:attribution] = <<-HTML - © 2005–2018 Haxe Foundation
+ © 2005–2020 Haxe Foundation
Licensed under a MIT license. HTML @@ -20,7 +20,7 @@ module Docs code: 'https://github.com/HaxeFoundation/haxe' } - options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i] + options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i] end version 'C++' do @@ -67,6 +67,10 @@ module Docs self.base_url = 'https://api.haxe.org/python/' end + version 'Eval' do + self.base_url = 'https://api.haxe.org/eval/' + end + def get_latest_version(opts) doc = fetch_doc('https://api.haxe.org/', opts) label = doc.at_css('.container.main-content h1 > small').content From 97edd615031bed4307cf3e8c076027bee93d8c3c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Fri, 13 Nov 2020 00:06:47 +0100 Subject: [PATCH 2/2] haxe: update release, clean html --- lib/docs/filters/haxe/clean_html.rb | 6 ++++-- lib/docs/scrapers/haxe.rb | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/docs/filters/haxe/clean_html.rb b/lib/docs/filters/haxe/clean_html.rb index 4e9bd635..c75316b5 100644 --- a/lib/docs/filters/haxe/clean_html.rb +++ b/lib/docs/filters/haxe/clean_html.rb @@ -2,7 +2,7 @@ module Docs class Haxe class CleanHtmlFilter < Filter def call - css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove + css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove css('h4 + h1').each do |node| node.after(node.previous_element) @@ -28,8 +28,10 @@ module Docs end css('.field').each do |node| + h3 = node.at_css('h3:not(:empty)') + next unless h3.present? link = node.at_css('a[name]') - node.at_css('h3:not(:empty)')['id'] = link['name'] + h3['id'] = link['name'] link.before(link.children).remove node.before(node.children).remove end diff --git a/lib/docs/scrapers/haxe.rb b/lib/docs/scrapers/haxe.rb index 892085be..4950ed67 100644 --- a/lib/docs/scrapers/haxe.rb +++ b/lib/docs/scrapers/haxe.rb @@ -2,7 +2,7 @@ module Docs class Haxe < UrlScraper self.name = 'Haxe' self.type = 'simple' - self.release = '4.0.5' + self.release = '4.1.3' self.base_url = 'https://api.haxe.org/' html_filters.push 'haxe/clean_html', 'haxe/entries'