Let inline math parsing allow blank spaces adjacent to dollar signs

Could we let the syntax parsing program recognize the words embraced by the dollar signs as an inline math block without considering the presence of blank spaces immediately after and before the dollar signs

For instance, see the following thread.

For a reason, when writing in LaTeX, it is necessary to type a space after a math code, hence the live preview may break down for a moment before typing the following characters after one finishes writing a math symbol.