|
|
@ -8,7 +8,7 @@ module Docs
|
|
|
|
at_css('h1').content = context[:root_title]
|
|
|
|
at_css('h1').content = context[:root_title]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('.docs-prevnext', '.hash-link', '.edit-page-link', '.edit-github').remove
|
|
|
|
css('.docs-prevnext', '.hash-link', '.edit-page-link', '.edit-github', 'a.hash', '.edit-page-block', 'a.show', 'a.hide').remove
|
|
|
|
|
|
|
|
|
|
|
|
css('table h1', 'table h2', 'table h3').each do |node|
|
|
|
|
css('table h1', 'table h2', 'table h3').each do |node|
|
|
|
|
table = node
|
|
|
|
table = node
|
|
|
@ -16,15 +16,15 @@ module Docs
|
|
|
|
table.replace(node)
|
|
|
|
table.replace(node)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('a.anchor').each do |node|
|
|
|
|
css('a.anchor', 'a.hashref').each do |node|
|
|
|
|
node.parent['id'] = node['name']
|
|
|
|
node.parent['id'] = node['name'] || node['id']
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('.highlight').each do |node|
|
|
|
|
css('.highlight').each do |node|
|
|
|
|
node.name = 'pre'
|
|
|
|
node.name = 'pre'
|
|
|
|
node.css('.gutter').remove
|
|
|
|
node.css('.gutter').remove
|
|
|
|
node['data-language'] = node.at_css('[data-lang]').try(:[], 'data-lang') || 'js'
|
|
|
|
node['data-language'] = node.at_css('[data-lang]').try(:[], 'data-lang') || 'js'
|
|
|
|
node.content = node.content
|
|
|
|
node.content = node.content.strip
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
css('table.highlighttable').each do |node|
|
|
|
|
css('table.highlighttable').each do |node|
|
|
|
|