Update Symfony documentation (3.1.2, 3.0.1, 2.8.2, 2.7.9)

pull/447/merge
Thibaut Courouble 9 years ago
parent 38503c054f
commit 96d50431bf

@ -2,9 +2,11 @@ module Docs
class Symfony class Symfony
class CleanHtmlFilter < Filter class CleanHtmlFilter < Filter
def call 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.content = 'Symfony' if root_page?
node.parent.before(node).remove node.parent.before(node).remove
end end
@ -22,6 +24,13 @@ module Docs
node.before(node.children).remove node.before(node.children).remove
end end
css('.container-fluid').each do |node|
html = node.inner_html
html.gsub! %r{<div class="col[^>]+>(.+?)</div>}, '<td>\1</td>'
html.gsub! %r{<div class="row[^>]+>(.+?)</div>}, '<tr>\1</tr>'
node.replace("<table>#{html}</table>")
end
doc doc
end end
end end

@ -26,6 +26,11 @@ module Docs
Licensed under the MIT License. Licensed under the MIT License.
HTML HTML
version '3.1' do
self.release = '3.1.2'
self.base_url = "http://api.symfony.com/#{version}/"
end
version '3.0' do version '3.0' do
self.release = '3.0.1' self.release = '3.0.1'
self.base_url = "http://api.symfony.com/#{version}/" self.base_url = "http://api.symfony.com/#{version}/"

Loading…
Cancel
Save