diff --git a/lib/docs/filters/symfony/clean_html.rb b/lib/docs/filters/symfony/clean_html.rb index 98f6aecc..7926b9a7 100644 --- a/lib/docs/filters/symfony/clean_html.rb +++ b/lib/docs/filters/symfony/clean_html.rb @@ -2,9 +2,11 @@ module Docs class Symfony class CleanHtmlFilter < Filter def call - css('.location', '#footer').remove + @doc = at_css('#page-content') - css('.header > h1').each do |node| + css('.location', '.no-description').remove + + css('.page-header > h1').each do |node| node.content = 'Symfony' if root_page? node.parent.before(node).remove end @@ -22,6 +24,13 @@ module Docs node.before(node.children).remove end + css('.container-fluid').each do |node| + html = node.inner_html + html.gsub! %r{
]+>(.+?)
}, '\1' + node.replace("#{html}
") + end + doc end end diff --git a/lib/docs/scrapers/symfony.rb b/lib/docs/scrapers/symfony.rb index d77246f8..1cd3981b 100644 --- a/lib/docs/scrapers/symfony.rb +++ b/lib/docs/scrapers/symfony.rb @@ -26,6 +26,11 @@ module Docs Licensed under the MIT License. HTML + version '3.1' do + self.release = '3.1.2' + self.base_url = "http://api.symfony.com/#{version}/" + end + version '3.0' do self.release = '3.0.1' self.base_url = "http://api.symfony.com/#{version}/"