ianharrigan / mathmlformula

Automatically exported from code.google.com/p/mathmlformula
1 stars 0 forks source link

math formula breaks with empty nodes #15

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. an empty node causes it to fail.

What is the expected output? What do you see instead?
There is no output because the Class fails.

What version of the product are you using? On what operating system?
Latest.

Please provide any additional information below.
I have added the following line of code to the loadNode function in the 
MathML Class.  This gives some data so the procedure doesn't fail.

if(node.toString()==""){node.setChildren(" ")};

Here is the example equation I used that has an empty <mi> node in it.

<math><mrow><mi>w</mi><mo>&minus;</mo><mn>2</mn><mfrac><mrow><mn>1</mn></mr
ow><mrow><mn>2</mn></mrow></mfrac><mo>+</mo><mfrac><mrow><mn>2</mn></mrow><
mrow><mn>2</mn></mrow></mfrac><mi></mi><mo>=</mo><mn>2</mn><mfrac><mrow><mn
>1</mn></mrow><mrow><mn>3</mn></mrow></mfrac></mrow></math>

Thanks,
David

Original issue reported on code.google.com by davidcrs...@gmail.com on 9 Apr 2009 at 3:51

GoogleCodeExporter commented 8 years ago
I have commit the fix,

thank you

Original comment by ionel.alexandru@gmail.com on 14 Apr 2009 at 8:21

GoogleCodeExporter commented 8 years ago

Original comment by ionel.alexandru@gmail.com on 14 Apr 2009 at 8:22