chhoumann / MetaEdit

MetaEdit for Obsidian
https://bagerbach.com
GNU General Public License v3.0
393 stars 15 forks source link

Add option to eliminate duplicates when adding value to "multi" properties. #63

Open Elyassine94 opened 2 years ago

Elyassine94 commented 2 years ago

Hi, I am new to using this plugin. I've noticed when appending a value to a yaml property of type multi (array of values) it actually keeps duplicates. It would be so nice if this is not the case and we can configure it to filter duplicate values out. It will be especially useful when the plugin is used from a script.

ManasMadrecha commented 1 year ago

Before appending the value, you could check for arr.includes("value you are appending"). If it is true, don't append, if not, then only append.