text-snippets-obsidian icon indicating copy to clipboard operation
text-snippets-obsidian copied to clipboard

Allow colons inside snippets

Open Oskiator opened this issue 3 years ago • 1 comments

Hi, It would be great to have the possibility to use colons inside a snippets using a specific notation to distinguish them from the fornat 'snippets : result'.

Example

exc : > [!example] Exemple $tb$ $nl$
> 🧑 **Coach** : $tb$ $nl$
> 👸 Coaché.e : $tb$ $nl$

Actual Result

[!example] Exemple 🧑 Coach

Expected Result

[!example] Exemple 🧑 Coach : $tb$ 👸 Coaché.e : $tb$

Enjoy your day ! Michaël

Oskiator avatar Aug 26 '22 11:08 Oskiator

If you type : (one space before and after a : symbol) somewhere in the config, the plugin interprets it as a snippet declaration

So, it's not really a fix, but if you type something :$tb$ instead of something : $tb$, it will not mistake it with a snippet declaration

So try this instead (I removed the space after the colons) :

exc : > [!example] Exemple $tb$ $nl$
> 🧑 **Coach** :$tb$ $nl$
> 👸 Coaché.e :$tb$ $nl$

jeansordes avatar Nov 28 '22 00:11 jeansordes