File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
contentcuration/contentcuration
utils/assessment/qti/mathml Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -166,6 +166,21 @@ def test_simple_block_math(self):
166166
167167 self ._assert_conversion (markdown_text , expected )
168168
169+ def test_mo_accented (self ):
170+ """Regression test for missed experimental property on mo tags"""
171+
172+ markdown_text = "$$a_b+\\ overrightarrow{abc}+\\ overleftarrow{abc}\\ div\\ surd\\ overline{abc}$$"
173+ expected = (
174+ '<math display="block">'
175+ "<semantics><mrow><msub><mi>a</mi><mi>b</mi></msub><mo>+</mo><mover><mrow><mi>a</mi><mi>b</mi><mi>c</mi></mrow><mo>→</mo></mover><mo>+</mo>"
176+ '<mover><mrow><mi>a</mi><mi>b</mi><mi>c</mi></mrow><mo>←</mo></mover><mi>÷</mi><mo stretchy="false">√</mo><mover><mrow><mi>a</mi><mi>b</mi>'
177+ '<mi>c</mi></mrow><mo accent="true">―</mo></mover></mrow>'
178+ '<annotation encoding="application/x-tex">a_b+\\ overrightarrow{abc}+\\ overleftarrow{abc}\\ div\\ surd\\ overline{abc}</annotation></semantics>'
179+ "</math>"
180+ )
181+
182+ self ._assert_conversion (markdown_text , expected )
183+
169184
170185class TestTexMathPlugin (TexMathTestMixin , unittest .TestCase ):
171186 """Test direct markdown conversion: markdown → HTML+MathML"""
Original file line number Diff line number Diff line change @@ -45,6 +45,7 @@ class Mn(MathMLTokenElement):
4545
4646
4747class Mo (MathMLTokenElement ):
48+ accent : Optional [bool ] = None
4849 fence : Optional [bool ] = None
4950 form : Optional [MathMLForm ] = None
5051 largeop : Optional [bool ] = None
You can’t perform that action at this time.
0 commit comments