haxe: update release, clean html

pull/1182/head
Simon Legner 4 years ago
parent e75655ac08
commit 97edd61503

@ -2,7 +2,7 @@ module Docs
class Haxe class Haxe
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call 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| css('h4 + h1').each do |node|
node.after(node.previous_element) node.after(node.previous_element)
@ -28,8 +28,10 @@ module Docs
end end
css('.field').each do |node| css('.field').each do |node|
h3 = node.at_css('h3:not(:empty)')
next unless h3.present?
link = node.at_css('a[name]') link = node.at_css('a[name]')
node.at_css('h3:not(:empty)')['id'] = link['name'] h3['id'] = link['name']
link.before(link.children).remove link.before(link.children).remove
node.before(node.children).remove node.before(node.children).remove
end end

@ -2,7 +2,7 @@ module Docs
class Haxe < UrlScraper class Haxe < UrlScraper
self.name = 'Haxe' self.name = 'Haxe'
self.type = 'simple' self.type = 'simple'
self.release = '4.0.5' self.release = '4.1.3'
self.base_url = 'https://api.haxe.org/' self.base_url = 'https://api.haxe.org/'
html_filters.push 'haxe/clean_html', 'haxe/entries' html_filters.push 'haxe/clean_html', 'haxe/entries'

Loading…
Cancel
Save