Unified · Split
| @@ -109,6 +109,20 @@ module Docs · 108 unmodified lines | ||
| 109 | 109 | node['src'] = node['src'].sub! %r{http://en.cppreference.com/common/([^"']+?)\.svg}, 'http://upload.cppreference.com/mwiki/\1.svg' |
| 110 | 110 | end |
| 111 | 111 | |
| 112 | + # temporary solution due lack of mathjax/mathml support | |
| 113 | + css('.t-mfrac').each do |node| | |
| 114 | + fraction = Nokogiri::XML::Node.new('span', doc) | |
| 115 | + | |
| 116 | + node.css('td').each do |node| | |
| 117 | + fraction.add_child("<span>#{node.content}</span>") | |
| 118 | + end | |
| 119 | + | |
| 120 | + fraction.last_element_child().before("<span>/</span>") | |
| 121 | + | |
| 122 | + node.before(fraction) | |
| 123 | + node.remove | |
| 124 | + end | |
| 125 | + | |
| 112 | 126 | doc |
| 113 | 127 | end |
| 114 | 128 | end |