test: ensure mmultiscript convert to latex with none on preset
This commit is contained in:
parent
a4bd5491d3
commit
97c97f9b06
@ -917,7 +917,7 @@ describe('#convert', () => {
|
||||
});
|
||||
|
||||
describe('with subscript and superscript and full preset', () => {
|
||||
it('handler it as it were a subsup tag', () => {
|
||||
it('add prescript to latex subsup expression', () => {
|
||||
const mathml = mathmlStrings.mmultiscriptPreset;
|
||||
|
||||
const result = MathMLToLaTeX.convert(mathml);
|
||||
@ -925,5 +925,15 @@ describe('#convert', () => {
|
||||
expect(result).toBe('\\_{b}^{a}X_{d}^{c}');
|
||||
});
|
||||
});
|
||||
|
||||
describe('with post and preset with empty fields', () => {
|
||||
it('add prescript to latex subsup expression', () => {
|
||||
const mathml = mathmlStrings.mmultiscriptPresetWithNone;
|
||||
|
||||
const result = MathMLToLaTeX.convert(mathml);
|
||||
|
||||
expect(result).toBe('\\_{b}^{}X_{}^{c}');
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1527,3 +1527,18 @@ export const mmultiscriptPreset = `<math xmlns="http://www.w3.org/1998/Math/Math
|
||||
|
||||
</mmultiscripts>
|
||||
</math>`;
|
||||
|
||||
export const mmultiscriptPresetWithNone = `<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
|
||||
<mmultiscripts>
|
||||
|
||||
<mi>X</mi> <!-- base expression -->
|
||||
|
||||
<none /> <!-- postsubscript -->
|
||||
<mi>c</mi> <!-- postsuperscript -->
|
||||
|
||||
<mprescripts />
|
||||
<mi>b</mi> <!-- presubscript -->
|
||||
<none /> <!-- presuperscript -->
|
||||
|
||||
</mmultiscripts>
|
||||
</math>`;
|
||||
|
Loading…
Reference in New Issue
Block a user