Skip to content

Support $$ on separate opening and closing lines #270

@postmath

Description

@postmath

It appears that many markdown parsers supporting LaTeX allow the opening and closing $ or $$ to be on different lines, but it doesn't appear to work in md4c.

To reproduce:

this works: $$ a + b $$ but this doesn't:
$$
a + b
$$

Expected rendering: here's an example from stackedit.io, source on the left, rendered on the right.

image

Actual result in md4c: the LaTeX on the first line results in the callbacks I would expect (having set MD_FLAG_LATEXMATHSPANS), but the other LaTeX doesn't. In particular, it looks like it sees the pair of dollars on line 2 as an opening and closing pair, and similarly for the pair on line 4.

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