|
|
|
@ -15,10 +15,14 @@ module Docs
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
css('pre').each do |node|
|
|
|
|
|
node['data-language'] = 'kotlin' if node.at_css('code[data-lang="text/x-kotlin"]')
|
|
|
|
|
node['data-language'] = 'xml' if node.at_css('code[data-lang="application/xml"]')
|
|
|
|
|
node['data-language'] = 'javascript' if node.at_css('code[data-lang="text/javascript"]')
|
|
|
|
|
node['data-language'] = 'kotlin' if node.at_css('code.language-kotlin')
|
|
|
|
|
node['data-language'] = 'groovy' if node.at_css('code.language-groovy')
|
|
|
|
|
node['data-language'] = 'javascript' if node.at_css('code.language-javascript')
|
|
|
|
|
node['data-language'] = 'xml' if node.at_css('code.language-xml')
|
|
|
|
|
node.content = node.content
|
|
|
|
|
node.parent.remove_attribute('data-highlight-only')
|
|
|
|
|
node.parent.remove_attribute('data-lang')
|
|
|
|
|
node.parent.remove_attribute('theme')
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|