arnau / obsidian-metatable

An Obsidian plugin to display the frontmatter section as a fully expanded table.
MIT License
150 stars 13 forks source link

When ignoring null skip also empty arrays #7

Closed MrModest closed 3 years ago

MrModest commented 3 years ago

Hi! Good plugin!

I thought if we don't want see a null values we also won't want see empty arrays.

For example, now I have YAML like this:

---
tags: [category]
aliases: []
created: '23.05.2021 22:20'
---

and see:

image

or (if expanded)

image

After fix we will ignore fields like this.

MrModest commented 3 years ago

Could I ask a minor change though? Instead of exporting isEmptyArray as a default in utils.ts exporting it as export function isEmptyArray?

Oh, of course! Fixed)

arnau commented 3 years ago

Thanks! 0.8.4 is out with your fix 🙏