remarkjs / remark

markdown processor powered by plugins part of the @unifiedjs collective
https://remark.js.org
MIT License
7.66k stars 358 forks source link

Footnotes do not work within mermaid diagrams #1208

Closed lschierer closed 1 year ago

lschierer commented 1 year ago

Initial checklist

Affected packages and versions

"remark-rehype": "^10.0.0", "rehype-mermaidjs": "^1.0.1", "remark-gfm": "^3.0.1",

Link to runnable example

https://stackblitz.com/edit/github-3bxwan

Steps to reproduce

See the runnable example in stackblitz, however I initially hit this in a project using astro with tsc to build the typescript.

Expected behavior

the footnotes should work globally, because the gfm plugin should have processed first.

Actual behavior

the footnotes only work outside the mermaid diagram.

Runtime

Node v17, Node v16

Package manager

npm 8, pnpm

OS

macOS

Build and bundle tools

Vite, Other (please specify in steps to reproduce)

ChristianMurphy commented 1 year ago

Welcome @lschierer! 👋 Codeblocks including mermaid do cannot have inner markdown. Including references and footnotes. This is by design, and how GFM works.

github-actions[bot] commented 1 year ago

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