Skip to content

Math fences are forcefully rendered as ProseCode #3002

@JakeIsMeh

Description

@JakeIsMeh

Environment

Reproduction

Don't really have the time to make one right now, but am willing to.

Describe the bug

With Content V2, installing remark-math and rehype-katex allows for math blocks to be treated LaTeX expressions and rendered as such.

With Content V3, such blocks as forcefully rendered as ProseCode despite both remark-math and rehype-katex being present. (dollar sign delimited math blocks still render fine)

Additional context

Happens with Content V3 only.

Markdown math reference: https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/writing-mathematical-expressions

Math fence blocks:

**The Cauchy-Schwarz Inequality**
```math
\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)
```

The Cauchy-Schwarz Inequality

$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

Math dollar sign delimiters:

**The Cauchy-Schwarz Inequality**\
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

The Cauchy-Schwarz Inequality
$$\left( \sum_{k=1}^n a_k b_k \right)^2 \leq \left( \sum_{k=1}^n a_k^2 \right) \left( \sum_{k=1}^n b_k^2 \right)$$

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions