We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 895db14 commit 056ec27Copy full SHA for 056ec27
1 file changed
lib/html2doc/math.rb
@@ -61,9 +61,13 @@ def encode_math(elem)
61
def mathml_insert_rows(math, docnamespaces)
62
math.xpath(%w(msup msub msubsup munder mover munderover)
63
.map { |m| ".//xmlns:#{m}" }.join(" | "), docnamespaces).each do |x|
64
- next unless x.next_element && x.next_element != "mrow"
65
-
66
- x.next_element.wrap("<mrow/>")
+ #next unless x.next_element && x.next_element != "mrow"
+ #x.next_element.wrap("<mrow/>")
+ x.elements.size == 2 or next
67
+ x.elements.each do |y|
68
+ %w(mrow mstyle).include?(y.name) or next
69
+ y.wrap("<mrow/>")
70
+ end
71
end
72
math
73
0 commit comments