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