Skip to content

Inline code breaks display math for OxHugoFlavouredMarkdown #2284

@kaibagley

Description

@kaibagley

Describe the bug
When using the OxHugoFlavouredMarkdown plugin, inline code containing unmatched math delimiters such as `$$` or `\[` will cause display math blocks afterwards to render incorrectly.

To Reproduce
Steps to reproduce the behavior:

  1. Enable the OxHugoFlavouredMarkdown plugin
  2. Add the following to a Markdown file:
Markdown math
$$
f_n(\mathbf{y};\theta)
= \prod_{k=1}^n f_{k}^{\text{univar}}(y_k;\theta)
$$

Ox-hugo math
\\[
f\_n(\mathbf{y};\theta)
= \prod\_{k=1}^n f\_{k}^{\text{univar}}(y\_k;\theta)
\\]

`$$`

Markdown math
$$
f_n(\mathbf{y};\theta)
= \prod_{k=1}^n f_{k}^{\text{univar}}(y_k;\theta)
$$

Ox-hugo math
\\[
f\_n(\mathbf{y};\theta)
= \prod\_{k=1}^n f\_{k}^{\text{univar}}(y\_k;\theta)
\\]
  1. Render it using Quartz
  2. See that both ox-hugo, and markdown math render properly before the $$, but after, only the markdown math renders properly.

Expected behavior
Characters contained in inline verbatim/code don't have any influence on markup rendering.

Screenshots and Source
Image

Desktop (please complete the following information):

  • Quartz Version: 4.5.2
  • node Version: v25.3.0
  • npm version: 11.7.0
  • OS: Arch, Ubuntu 24
  • Browser: Firefox, Chromium

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions