Do not treat everything between two $ as TeX math
Typing $1 instead of $2 should not be treated as TeX math
The opening $ must have a non-space character immediately to its right, while the closing $ must have a non-space character immediately to its left, and must not be followed immediately by a digit. Thus, $20,000 and $30,000 won’t parse as math.
Wouldn't these rules block something like $1 + 1$ as well?
The rule is for the cases where we should parse input as TeX.
so as per the rule $1 + 1$ will be a valid TeX.
Ah sorry, I misread that the opening one is not allow to be followed by a digit instead of the closing one.