From 1e3ce4760075890c24aaec459e032a877511245b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Thu, 9 Jan 2020 16:27:08 -0500 Subject: [PATCH] Only record actual 'node' nodes. Resolves issue mathjax/MathJax#2283. --- ts/input/tex/NodeFactory.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ts/input/tex/NodeFactory.ts b/ts/input/tex/NodeFactory.ts index 8d074f709..7e37aafe7 100644 --- a/ts/input/tex/NodeFactory.ts +++ b/ts/input/tex/NodeFactory.ts @@ -187,7 +187,9 @@ export class NodeFactory { public create(kind: string, ...rest: any[]): MmlNode { const func = this.factory[kind] || this.factory['node']; const node = func(this, rest[0], ...rest.slice(1)); - this.configuration.addNode(rest[0], node); + if (kind === 'node') { + this.configuration.addNode(rest[0], node); + } return node; }