checks a large number of usual and unusual cases in regards to having a prime as a superscript. NOTE: some tests may not make sense mathematically.
<math xmlns="http://www.w3.org/1998/Math/MathML"> <msup> <mi>x</mi> <mn>2</mn> </msup> <mo>+</mo> <msup> <mn>2</mn> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>x</mi> <mo> ′</mo> </msup> <mo>+</mo> <msup> <mi>x</mi> <mo>'</mo> </msup> <mo>+</mo> <msup> <mi>x</mi> <mo>''</mo> </msup> <mo>+</mo> <mi>x</mi> <mi>′</mi> <mo>+</mo> <msup> <msup> <mi>x</mi> <mo>'</mo> </msup> <mo>'</mo> </msup> <mo>+</mo> <msup> <msup> <mi>x</mi> <mo>'</mo> </msup> <mn>2</mn> </msup> <mo>+</mo> <msup> <mi>x</mi> <mrow> <mo>'</mo> <mo>+</mo> <mo>'</mo> </mrow> </msup> <mo>+</mo> <msup> <msup> <mi>x</mi> <mo>'</mo> </msup> <mo>'</mo> </msup> <mo>+</mo> <msup> <mi>x</mi> <msup> <mo>'</mo> <mo>'</mo> </msup> </msup> <mo>+</mo> <msup> <mo>'</mo> <mo>'</mo> </msup> <mo>+</mo> <msup> <mo>'</mo> <mo>'</mo> </msup> </math>
Author: Dave Doyle, Design Science