zsviczian / obsidian-excalidraw-plugin

A plugin to edit and view Excalidraw drawings in Obsidian
4.06k stars 219 forks source link

FR: Support compatibility with Obsidian Linter Plugin #1811

Closed razetdinov closed 4 months ago

razetdinov commented 4 months ago

Is your feature request related to a problem? Please describe. Markdown Best Practices state the following:

You should also put blank lines before and after a heading for compatibility.

Obsidian Linter plugin has a setting which ensures that all headings have a blank line both before and after.

Switching this setting on breaks excalidraw images, as it inserts blank lines before and after the Text Elements heading.

Describe the solution you'd like Excalidraw should ignore blank lines before and after Text Elements heading. Obsidian itself behaves this way. For example, if you trancslude a referenced block, Obsidian ignores all the blank lines before it.

Describe alternatives you've considered Temporary workaround is to switch off the before mentioned setting in Obsidian Linter plugin preferences.

Additional context Before blank lines are added around headings:

Screenshot 2024-06-03 at 15 44 28

After blank lines are added around headings:

Screenshot 2024-06-03 at 15 44 10
zsviczian commented 4 months ago

My answer has two parts: 1) I do not recommend automatically changing Excalidraw files with Linter or any other metadata plugins, and I cannot manage compatibility with other plugins. That is simply not feasible... I personally avoid any plugins that change files in the background - but that is a personal choice. 2) If you decided to do it anyway, there is a compatibility setting for this introduced in v 2.2.3.

image