Move from regex tex parsing to state machine. Problem + Regex = 2 Problems
Fixed texMode being left set to true after 1 line tex string
Fixed regression where single line tex output will be given it's own mathElement