({
type, htmlBuilder, mathmlBuilder,
}: {
type: NODETYPE;
htmlBuilder?: HtmlBuilder<NODETYPE>;
mathmlBuilder: MathMLBuilder<NODETYPE>;
})
| 195 | * stand-alone handler provided to `defineFunction`). |
| 196 | */ |
| 197 | export function defineFunctionBuilders<NODETYPE extends NodeType>({ |
| 198 | type, htmlBuilder, mathmlBuilder, |
| 199 | }: { |
| 200 | type: NODETYPE; |
| 201 | htmlBuilder?: HtmlBuilder<NODETYPE>; |
| 202 | mathmlBuilder: MathMLBuilder<NODETYPE>; |
| 203 | }) { |
| 204 | if (htmlBuilder) { |
| 205 | _htmlGroupBuilders[type] = htmlBuilder; |
| 206 | } |
| 207 | if (mathmlBuilder) { |
| 208 | _mathmlGroupBuilders[type] = mathmlBuilder; |
| 209 | } |
| 210 | } |
| 211 | |
| 212 | export const normalizeArgument = function(arg: AnyParseNode): AnyParseNode { |
| 213 | return arg.type === "ordgroup" && arg.body.length === 1 ? arg.body[0] : arg; |
no outgoing calls
no test coverage detected