Obsidian stops rending SVG in viewer mode if it encounters an empty line

Steps to reproduce

In editor mode the following SVG code will display correctly:

<svg width="200" height="200"> 
<circle cx="50" cy="50" r="40" fill="blue"/>

<circle cx="80" cy="50" r="40" fill="blue"/> 
</svg>

In viewer mode however it will only draw the first circle

If I add a space inside the empty line between the circle commands, the second circle will render properly in viewer mode.

Did you follow the troubleshooting guide? [Y]

Expected result

I expected no difference

Actual result

No difference

Environment

SYSTEM INFO:
Obsidian version: v1.7.3
Installer version: v1.6.3
Operating system: Windows 10 Home N 10.0.22631
Login status: logged in
Language: en
Catalyst license: vip
Insider build toggle: on
Live preview: on
Base theme: light
Community theme: Blue Topaz v2024071502
Snippets enabled: 0
Restricted mode: on

RECOMMENDATIONS:
Custom theme and snippets: for cosmetic issues, please first try updating your theme and disabling your snippets. If still not fixed, please try to make the issue happen in the Sandbox Vault or disable community theme and snippets.


Additional information

Yes this is not a bug. It’s intentional.
All Html code must be in the same markdown block (no blank lines)

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.