C/Cpp: improve format of fractions

pull/1606/head
Enoc 3 years ago
parent fdfcf3d917
commit ef449857d5

@ -109,6 +109,20 @@ module Docs
node['src'] = node['src'].sub! %r{http://en.cppreference.com/common/([^"']+?)\.svg}, 'http://upload.cppreference.com/mwiki/\1.svg'
end
# temporary solution due lack of mathjax/mathml support
css('.t-mfrac').each do |node|
fraction = Nokogiri::XML::Node.new('span', doc)
node.css('td').each do |node|
fraction.add_child("<span>#{node.content}</span>")
end
fraction.last_element_child().before("<span>/</span>")
node.before(fraction)
node.remove
end
doc
end
end

Loading…
Cancel
Save