d12frosted / vulpea

A collection of functions for note taking based on `org` and `org-roam`.
GNU General Public License v3.0
236 stars 12 forks source link

(fix) Only insert new line when there is more than one meta item #135

Closed d4ncer closed 2 years ago

d4ncer commented 2 years ago

Addresses #134

I haven't added a test for this because:

That being said, I'm very happy to learn eldev & introduce some tests for this function in general, including coverage for my fix.

d4ncer commented 2 years ago

Have tested locally and it works as expected 👍

d12frosted commented 2 years ago

Hey,

Thank you very much for detailed report and a suggested fix 💯

There are tests for this functionality though they are located in vulpea-meta-test.el file. Of course, for historical reasons (tm) 😸

I have fought with new lines and never tested the case when your first description list is inside of headline. It makes sense to fix this case, but keep in mind that with #75 that metadata will be related to heading and not to the file.

Cherry-picked as 12b28df and added a simple test case in 38efd2e. Feel free to add more test cases 😸