test: wrap base of msubsup into parenthesis if there is spaces

This commit is contained in:
Alexandre Nunes 2020-09-15 12:39:13 -03:00
parent fc757425fc
commit f10c600de8
1 changed files with 22 additions and 0 deletions

View File

@ -1320,5 +1320,27 @@ describe('#convert', () => {
expect(result).toBe('\\int_{0}^{1}');
});
it('wraps base inside parentheses when there are empty spaces on it', () => {
const mathml = `
<root>
<math>
<msubsup>
<mrow>
<mn>x</mn>
<mo>+</mo>
<mn>y</mn>
</mrow>
<mn> 0 </mn>
<mn> 1 </mn>
</msubsup>
</math>
</root>
`;
const result = MathMLToLaTeX.convert(mathml);
expect(result).toBe('\\left(x + y\\right)_{0}^{1}');
});
});
});