Fix small issues with HAProxy scraper

pull/1398/head
Phil Scherer 4 years ago
parent 450adb5e72
commit a86391bf29

@ -2,7 +2,7 @@ module Docs
class Haproxy
class CleanHtmlFilter < Filter
def call
css('br', 'hr' '.text-right', '.dropdown-menu', 'table.summary').remove
css('br, hr, .text-right, .dropdown-menu, table.summary').remove
css('.alert-success > img[src$="check.png"]').remove
css('.alert-error > img[src$="cross.png"]').remove
@ -29,6 +29,10 @@ module Docs
node['id'] = node.at_css('.anchor')['name']
end
css('.keyword > b').each do |node|
node.content = node.content
end
css('.dropdown').each do |node|
node.content = node.content
end

@ -33,7 +33,7 @@ module Docs
elsif node.name == 'div'
node.css('.keyword').each do |n|
name = n.at_css('b').content
id = n.at_css('a.anchor')['name']
id = n['id']
entries << [name, URI.escape(id), REPLACE_TYPE[type] || type]
end
end

@ -1,5 +1,6 @@
module Docs
class Haproxy < UrlScraper
self.name = 'HAProxy'
self.type = 'haproxy'
self.root_path = 'intro.html'
self.initial_paths = %w(intro.html configuration.html management.html)

Loading…
Cancel
Save