Commit node_modules
This commit is contained in:
34
paige/node_modules/katex/src/functions/htmlmathml.js
generated
vendored
Normal file
34
paige/node_modules/katex/src/functions/htmlmathml.js
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
// @flow
|
||||
import defineFunction, {ordargument} from "../defineFunction";
|
||||
import buildCommon from "../buildCommon";
|
||||
|
||||
import * as html from "../buildHTML";
|
||||
import * as mml from "../buildMathML";
|
||||
|
||||
defineFunction({
|
||||
type: "htmlmathml",
|
||||
names: ["\\html@mathml"],
|
||||
props: {
|
||||
numArgs: 2,
|
||||
allowedInText: true,
|
||||
},
|
||||
handler: ({parser}, args) => {
|
||||
return {
|
||||
type: "htmlmathml",
|
||||
mode: parser.mode,
|
||||
html: ordargument(args[0]),
|
||||
mathml: ordargument(args[1]),
|
||||
};
|
||||
},
|
||||
htmlBuilder: (group, options) => {
|
||||
const elements = html.buildExpression(
|
||||
group.html,
|
||||
options,
|
||||
false
|
||||
);
|
||||
return buildCommon.makeFragment(elements);
|
||||
},
|
||||
mathmlBuilder: (group, options) => {
|
||||
return mml.buildExpressionRow(group.mathml, options);
|
||||
},
|
||||
});
|
Reference in New Issue
Block a user