mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-07 12:18:39 +00:00
\char character escaping and nicer MathML via \html@mathml (#1454)
* \html@mathml Fix #1452 * Add missing file * Implement \char (via internal \@char) * Remove excess <mstyle> wrapper on \mathbin etc. * Fix tests * Add Unicode support for \copyright and \textregistered Testing that this doesn't lead to an infinite loop thanks to \char` escaping. * Add tests * Use assertNodeType * Switch from regex to lookup table, and no parseInt
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// @flow
|
||||
import defineFunction, {ordargument} from "../defineFunction";
|
||||
import buildCommon from "../buildCommon";
|
||||
import mathMLTree from "../mathMLTree";
|
||||
import domTree from "../domTree";
|
||||
import ParseNode from "../ParseNode";
|
||||
|
||||
import * as html from "../buildHTML";
|
||||
@@ -16,7 +16,7 @@ function htmlBuilder(group, options) {
|
||||
|
||||
function mathmlBuilder(group, options) {
|
||||
const inner = mml.buildExpression(group.value.value, options);
|
||||
return new mathMLTree.MathNode("mstyle", inner);
|
||||
return new domTree.documentFragment(inner);
|
||||
}
|
||||
|
||||
// Math class commands except \mathop
|
||||
|
Reference in New Issue
Block a user