Added \[ \] support.
Found issue with number of opened {} and env.
For example
{\begin{equation*}}
schould be wrong.