Make text operators <mi>s

Summary: According to the MathML spec [about
identifiers](http://www.w3.org/TR/MathML3/chapter3.html#id.3.2.3.3),
text function names should be <mi>s. This fixes that.

Fixes #202

Test plan:
 - `make test`

Auditors: alpert
This commit is contained in:
Emily Eisenberg 2015-03-13 08:09:46 -07:00
parent 2f552af02d
commit 51d751f96d
2 changed files with 4 additions and 1 deletions

View File

@ -265,7 +265,7 @@ var groupTypes = {
// TODO(emily): Add a space in the middle of some of these
// operators, like \limsup.
node = new mathMLTree.MathNode(
"mo", [new mathMLTree.TextNode(group.value.body.slice(1))]);
"mi", [new mathMLTree.TextNode(group.value.body.slice(1))]);
}
return node;

View File

@ -1214,5 +1214,8 @@ describe("A MathML builder", function() {
var text = getMathML("\\text{a}").children[0].children[0];
expect(text.children[0].type).toEqual("mtext");
var textop = getMathML("\\sin").children[0].children[0];
expect(textop.children[0].type).toEqual("mi");
});
});