xyhp915 / logseq-fenced-code-plus

A Logseq plugin for missing types of fenced code 🚀
MIT License
108 stars 17 forks source link

svg in rendered HTML in Document view has errors in non standard <br> line breaks - <br \> fixes this #23

Open acsr opened 1 year ago

acsr commented 1 year ago

I tried to export a rendered mermaid diagram manually by switchung to document view and use the DOM Inspector to copy the resulting SVG node into a svg file.

Usually this works great.

When trying to render the svg file via Chrome I received a error pointing to non closing tags.

When inspecting the source of the svg you find \nline breaks from multiline labels in the mermaid source rendered in the Logseq UI as <br> .

Changing all occurences of <br>to ´<br >` in the svg file fixes this error.

Maybe it is related to the mermaid.js library, but then it is obscure having the graphics rendered in Logseq properly.

If someone ever plans to add an Export as SVG button, or sticks by doing it manually, this is for you!

Logseq 0.9.1 MacOS and Fenced Code Plus 0.0.5