remarkjs/remark-math

[Nuxt MDC] reading 'mathFlowInside' undefined when parsing a multi-line formula

Sun-ZhenXing opened this issue · 4 comments

Initial checklist

Affected packages and versions

remark-math@6.0.0

Link to runnable example

https://stackblitz.com/edit/nuxt-starter-9lhesd?file=README.md

Steps to reproduce

I'm trying to use @nuxtjs/mdc, which is a similar technology to MDX.

I think this is a bug in remark-math, not Nuxt MDC.


Repo: https://stackblitz.com/edit/nuxt-starter-9lhesd?file=README.md.

Steps: Input $123$ or $$123$$ work well, but got error when entering a multi-line formula.

e.g:

$$
123
$$

Expected behavior

No error.

Actual behavior

Error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'mathFlowInside')
    at Object.exitMathFlowFence (remark-math.js?v=49db5ce9:140:19)
    at compile (index.js?v=49db5ce9:363:40)
    at fromMarkdown (index.js?v=49db5ce9:193:31)
    at parser (index.js?v=49db5ce9:18:12)
    at Function.parse (index.js?v=49db5ce9:668:12)
    at executor (index.js?v=49db5ce9:734:40)
    at new Promise (<anonymous>)
    at Function.process (index.js?v=49db5ce9:720:47)
    at parseMarkdown (index.mjs?v=49db5ce9:35:41)
    at async main (app.vue:6:15)

Runtime

Other (please specify in steps to reproduce)

Package manager

Other (please specify in steps to reproduce)

OS

Other (please specify in steps to reproduce)

Build and bundle tools

Vite

wooorm commented

Report this with nuxt: they should update there tools.
Or downgrade our packages for now

Hi! This was closed. Team: If this was fixed, please add phase/solved. Otherwise, please add one of the no/* labels.

Thanks, I will report this issue to Nuxt.

I have the same issue!