Determines if the specified position is within a Markdown inline math environment
Math environment definition: Surrounded by unescaped $ symbols, with $ adjacent to non-whitespace characters
Example: $123$ is a formula, while $ 123$ and $123 $ are not formulas
Parameters
line: string
The line to check
pos: number
The position to check (character index)
Returns boolean
Returns true if the position is within a math environment, otherwise false
Determines if the specified position is within a Markdown inline math environment Math environment definition: Surrounded by unescaped $ symbols, with $ adjacent to non-whitespace characters Example: $123$ is a formula, while $ 123$ and $123 $ are not formulas