Actually checks for whitespace and handles it now

It would previously count this as an equation, doing weird things.