This commit is contained in:
Calvin Lee 2024-08-15 13:50:45 +00:00
parent 224192d4ab
commit 736d50c62a

View file

@ -89,10 +89,10 @@ class Sanitize
annotation = semantics.children.find(&is_annotation_with_encoding.curry['application/x-tex']) annotation = semantics.children.find(&is_annotation_with_encoding.curry['application/x-tex'])
if annotation if annotation
text = if math.attributes['display']&.value == 'block' text = if math.attributes['display']&.value == 'block'
"$$#{annotation.text}$$" "$$#{annotation.text}$$"
else else
"$#{annotation.text}$" "$#{annotation.text}$"
end end
math.replace(Nokogiri::XML::Text.new(text, math.document)) math.replace(Nokogiri::XML::Text.new(text, math.document))
return return
end end