Fix CPP - Add support for super/subscript

pull/2090/head
Tim Lim 1 year ago
parent 887c879e0f
commit 5660baa390

@ -109,6 +109,16 @@ module Docs
node['src'] = node['src'].sub! %r{https://upload.cppreference.com/mwiki/(images/[^"']+?)}, 'http://upload.cppreference.com/mwiki/\1' node['src'] = node['src'].sub! %r{https://upload.cppreference.com/mwiki/(images/[^"']+?)}, 'http://upload.cppreference.com/mwiki/\1'
end end
css('.t-su.t-su-b').each do |node|
node.inner_html = node.inner_html.gsub('<br>', '')
node.name = 'sub'
end
css('.t-su:not(.t-su-b)').each do |node|
node.inner_html = node.inner_html.gsub('<br>', '')
node.name = 'sup'
end
# temporary solution due lack of mathjax/mathml support # temporary solution due lack of mathjax/mathml support
css('.t-mfrac').each do |node| css('.t-mfrac').each do |node|
fraction = Nokogiri::XML::Node.new('span', doc.document) fraction = Nokogiri::XML::Node.new('span', doc.document)

Loading…
Cancel
Save