zestedesavoir / zmarkdown

Live demo: https://zestedesavoir.github.io/zmarkdown/
MIT License
224 stars 52 forks source link

remark-captions: Code blocks are not rendering #490

Open adwinying opened 1 year ago

adwinying commented 1 year ago

Referring to this issue, code blocks are not rendered as the value prop is set when mdast is being generated.

StaloneLab commented 1 year ago

Thanks for opening an issue, I just looked at it and the behavior seems a bit weird, so I will take time to work on it soon.

adwinying commented 1 year ago

For those looking for a workaround, add the following lines of code as a custom remark plugin:

      () => (tree) => {
        visit(tree, "figure", (figure) => {
          delete figure.value;
        });
      },