Bug in ASCIIMathML.js -- cannot render `(a_i^)`.

63 views
Skip to first unread message

lwz

unread,
Sep 8, 2014, 10:24:09 AM9/8/14
to asci...@googlegroups.com
Hi All,

I've found again another uncaught exception when rendering `(a_i^)`. The node passed to AMremoveBrackets is null, and I don't think that should be the case at all, but I haven't investigated it. Thank you.

Regards,
lwz.

lwz

unread,
Sep 8, 2014, 10:40:48 AM9/8/14
to asci...@googlegroups.com
Hi All,

OK, I've solved it. It is under AMparseIexpr near the following lines:

    if (symbol.input == "_") {
      sym2 = AMgetSymbol(str);
      underover = (sym1.ttype == UNDEROVER);
      if (sym2.input == "^") {
        str = AMremoveCharsAndBlanks(str,sym2.input.length);
        var res2 = AMparseSexpr(str);
        if( res2[0]==null ) res2[0]=createMmlNode("mo",document.createTextNode("\u25A1"));

I added the last line (in bold) to solve the problem.

Regards,
lwz.
Reply all
Reply to author
Forward
0 new messages