fix replace regexp for katex bug