Skip to content

Cannot include escaped dollar when using dollars delimiters #32

@rogino

Description

@rogino

The regex for dollar delimiters breaks if the content includes an escaped dollar (\$), making it impossible to type dollar literals inside math blocks:

$$
\$10.00
$$

$\$10.00$

will all fail to be parsed as a latex block.

Workarounds include using a different delimiter style or use \text{\textdollar}, but getting it to work without these would be nice.

I've been to update the math_block regex from:

/\${2}([^$]+?)\${2}/gmy to

/\${2}((?:\\\$|[^$])+?)\${2}/gmy

but it doesn't cover all cases, and I haven't been able to figure out where to start with the math_inline regex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions