|
|
@ -7,17 +7,13 @@ module Docs
|
|
|
|
return doc
|
|
|
|
return doc
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('#api-header').each do |node|
|
|
|
|
css('header .title').each do |node|
|
|
|
|
node.replace(node.at_css('h1'))
|
|
|
|
node.parent.replace(node)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('.linksbox-container').remove
|
|
|
|
css('.lang-selector').remove
|
|
|
|
|
|
|
|
|
|
|
|
css('.highlight').each do |node|
|
|
|
|
css('.command-syntax').each do |node|
|
|
|
|
node.before(node.children).remove
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css('.command-body').each do |node|
|
|
|
|
|
|
|
|
node.name = 'pre'
|
|
|
|
node.name = 'pre'
|
|
|
|
node.inner_html = node.inner_html.gsub('</p>', "</p>\n")
|
|
|
|
node.inner_html = node.inner_html.gsub('</p>', "</p>\n")
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -26,6 +22,10 @@ module Docs
|
|
|
|
node.content = node.content
|
|
|
|
node.content = node.content
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css('.highlight', '> section', '.highlighter-rouge').each do |node|
|
|
|
|
|
|
|
|
node.before(node.children).remove
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('h1').each do |node|
|
|
|
|
css('h1').each do |node|
|
|
|
|
next if node['class'].to_s.include?('title')
|
|
|
|
next if node['class'].to_s.include?('title')
|
|
|
|
node.name = 'h2'
|
|
|
|
node.name = 'h2'
|
|
|
|