mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-06 03:38:39 +00:00
Support MathML display mode (#2220)
This commit is contained in:
@@ -359,7 +359,9 @@ exports[`A MathML builder should output \\limsup_{x \\rightarrow \\infty} correc
|
||||
|
||||
exports[`A MathML builder should output \\limsup_{x \\rightarrow \\infty} in displaymode correctly 1`] = `
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML"
|
||||
display="block"
|
||||
>
|
||||
<semantics>
|
||||
<mrow>
|
||||
<munder>
|
||||
@@ -766,7 +768,9 @@ exports[`A MathML builder special spaces render specially 1`] = `
|
||||
|
||||
exports[`A MathML builder tags use <mlabeledtr> 1`] = `
|
||||
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML">
|
||||
<math xmlns="http://www.w3.org/1998/Math/MathML"
|
||||
display="block"
|
||||
>
|
||||
<semantics>
|
||||
<mtable width="100%">
|
||||
<mtr>
|
||||
|
@@ -20,7 +20,8 @@ const getMathML = function(expr, settings = new Settings()) {
|
||||
maxSize: Infinity,
|
||||
});
|
||||
|
||||
const built = buildMathML(parseTree(expr, settings), expr, options);
|
||||
const built = buildMathML(parseTree(expr, settings), expr, options,
|
||||
settings.displayMode);
|
||||
|
||||
// Strip off the surrounding <span>
|
||||
return built.children[0].toMarkup();
|
||||
|
Reference in New Issue
Block a user