|
|
@ -27,7 +27,7 @@ module Docs
|
|
|
|
|
|
|
|
|
|
|
|
css('div[class^="highlight-"]').each do |node|
|
|
|
|
css('div[class^="highlight-"]').each do |node|
|
|
|
|
node.name = 'pre'
|
|
|
|
node.name = 'pre'
|
|
|
|
node['class'] = case node['class']
|
|
|
|
node['class'] = node['data-language'] = case node['class']
|
|
|
|
when 'highlight-python' then 'python'
|
|
|
|
when 'highlight-python' then 'python'
|
|
|
|
when 'highlight-html+django' then 'markup'
|
|
|
|
when 'highlight-html+django' then 'markup'
|
|
|
|
else ''
|
|
|
|
else ''
|
|
|
@ -35,6 +35,10 @@ module Docs
|
|
|
|
node.content = node.at_css('pre').content
|
|
|
|
node.content = node.at_css('pre').content
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
css('code > code').each do |node|
|
|
|
|
|
|
|
|
node.before(node.children).remove
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
doc
|
|
|
|
doc
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|