|
|
|
@ -4,17 +4,11 @@ module Docs
|
|
|
|
|
def call
|
|
|
|
|
css('hr').remove
|
|
|
|
|
|
|
|
|
|
css('.badges').each do |node|
|
|
|
|
|
node.remove
|
|
|
|
|
end
|
|
|
|
|
css('.badges').remove
|
|
|
|
|
|
|
|
|
|
css('pre').each do |node|
|
|
|
|
|
node['data-language'] = 'python'
|
|
|
|
|
end
|
|
|
|
|
css('pre').attr('data-language', 'python')
|
|
|
|
|
|
|
|
|
|
css('h1').each do |node|
|
|
|
|
|
node['style'] = nil
|
|
|
|
|
end
|
|
|
|
|
css('h1').attr('style', nil)
|
|
|
|
|
|
|
|
|
|
# Translate source files links to DevDocs links
|
|
|
|
|
links = Nokogiri::XML::Node.new('p', doc)
|
|
|
|
@ -23,7 +17,6 @@ module Docs
|
|
|
|
|
css('a.github').each do |node|
|
|
|
|
|
span = node.at_css('span')
|
|
|
|
|
node.content = span.content
|
|
|
|
|
span.remove
|
|
|
|
|
node['class'] = '_links-link'
|
|
|
|
|
links.add_child(node)
|
|
|
|
|
end
|
|
|
|
|