Fixes improperly italicizing embedded Tex/MathJax

This is a fix for issue #48. I added a test for this scenario and modified the regex.