Update haxe version + add eval package
Unified · Split
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Haxe |
| 3 | 3 | class CleanHtmlFilter < Filter |
| 4 | 4 | def call |
| 5 | − css('.viewsource', 'hr', 'h1 > small', '.inherited-fields').remove | |
| 5 | + css('.viewsource', 'hr', 'h1 > small', '.inherited-fields', '.label-meta').remove | |
| 6 | 6 | |
| 7 | 7 | css('h4 + h1').each do |node| |
| 8 | 8 | node.after(node.previous_element) |
| @@ -28,8 +28,10 @@ module Docs · 19 unmodified lines | ||
| 28 | 28 | end |
| 29 | 29 | |
| 30 | 30 | css('.field').each do |node| |
| 31 | + h3 = node.at_css('h3:not(:empty)') | |
| 32 | + next unless h3.present? | |
| 31 | 33 | link = node.at_css('a[name]') |
| 32 | − node.at_css('h3:not(:empty)')['id'] = link['name'] | |
| 34 | + h3['id'] = link['name'] | |
| 33 | 35 | link.before(link.children).remove |
| 34 | 36 | node.before(node.children).remove |
| 35 | 37 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | ||
| 2 | 2 | class Haxe < UrlScraper |
| 3 | 3 | self.name = 'Haxe' |
| 4 | 4 | self.type = 'simple' |
| 5 | − self.release = '3.4.7' | |
| 5 | + self.release = '4.1.3' | |
| 6 | 6 | self.base_url = 'https://api.haxe.org/' |
| 7 | 7 | |
| 8 | 8 | html_filters.push 'haxe/clean_html', 'haxe/entries' |
| @@ -10,7 +10,7 @@ module Docs · 1 unmodified line | ||
| 10 | 10 | options[:container] = '.span9' |
| 11 | 11 | |
| 12 | 12 | options[:attribution] = <<-HTML |
| 13 | − © 2005–2018 Haxe Foundation<br> | |
| 13 | + © 2005–2020 Haxe Foundation<br> | |
| 14 | 14 | Licensed under a MIT license. |
| 15 | 15 | HTML |
| 16 | 16 | |
| @@ -20,7 +20,7 @@ module Docs · 3 unmodified lines | ||
| 20 | 20 | code: 'https://github.com/HaxeFoundation/haxe' |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | − options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys)/i] | |
| 23 | + options[:skip_patterns] = [/\A(?:cpp|cs|flash|java|js|neko|php|python|lua|hl|sys|eval)/i] | |
| 24 | 24 | end |
| 25 | 25 | |
| 26 | 26 | version 'C++' do |
| @@ -67,6 +67,10 @@ module Docs · 40 unmodified lines | ||
| 67 | 67 | self.base_url = 'https://api.haxe.org/python/' |
| 68 | 68 | end |
| 69 | 69 | |
| 70 | + version 'Eval' do | |
| 71 | + self.base_url = 'https://api.haxe.org/eval/' | |
| 72 | + end | |
| 73 | + | |
| 70 | 74 | def get_latest_version(opts) |
| 71 | 75 | doc = fetch_doc('https://api.haxe.org/', opts) |
| 72 | 76 | label = doc.at_css('.container.main-content h1 > small').content |