|
|
@ -18,11 +18,11 @@ module Docs
|
|
|
|
# Remove image cards pointing to entries of the manual
|
|
|
|
# Remove image cards pointing to entries of the manual
|
|
|
|
css('.manual-cards').remove
|
|
|
|
css('.manual-cards').remove
|
|
|
|
|
|
|
|
|
|
|
|
# Pull the header out of it's container
|
|
|
|
# Pull the header out of its container
|
|
|
|
header = at_css('h1')
|
|
|
|
header = at_css('h1')
|
|
|
|
header.parent.parent.parent.add_previous_sibling header
|
|
|
|
header.parent.parent.parent.add_previous_sibling header
|
|
|
|
else
|
|
|
|
else
|
|
|
|
# Pull the header out of it's container
|
|
|
|
# Pull the header out of its container
|
|
|
|
header = at_css('h1')
|
|
|
|
header = at_css('h1')
|
|
|
|
header.parent.add_previous_sibling header
|
|
|
|
header.parent.add_previous_sibling header
|
|
|
|
end
|
|
|
|
end
|
|
|
@ -46,11 +46,6 @@ module Docs
|
|
|
|
pre['data-language'] = 'typescript' if node['class'] == 'lang-ts'
|
|
|
|
pre['data-language'] = 'typescript' if node['class'] == 'lang-ts'
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
# Add syntax highlighting to source files
|
|
|
|
|
|
|
|
css('pre.raw-source-code').each do |node|
|
|
|
|
|
|
|
|
node['data-language'] = 'javascript'
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Return the cleaned-up document
|
|
|
|
# Return the cleaned-up document
|
|
|
|
doc
|
|
|
|
doc
|
|
|
|
end
|
|
|
|
end
|
|
|
|