Closed stereobooster closed 4 months ago
Good catch. This is definitely a bug. I reported it upstream, but let’s keep this issue open until this is fixed. In the meantime, you could move rehypeRaw
before rehypeMermaid
.
It’s fixed in hast-util-raw@9.0.3
:tada:
About issue
This is not a bug in your code. Just want to let you know about it:
Without rehype-raw it would generate:
With rehype-raw it would generate:
It changes position of closing tag
</linearGradient>
. And the second option is wrong.About strategies
Which makes
rehypePlugins: [[rehypeMermaid, { strategy: "img-svg" }]],
a bit more reliable choice. But on the other hand it doesn't supportcss
(correct?).inline-svg
line-height
)rehype-raw
css
optionimg-svg
css
optionrehype-raw