Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: for multiple-value cells, make an option to have multiple lines of the same key instead of one key with multiple values #13

Open
ooker777 opened this issue Mar 10, 2022 · 3 comments
Labels
wontfix This will not be worked on

Comments

@ooker777
Copy link

ooker777 commented Mar 10, 2022

This is useful in Dataview queries, since with

key:: foo bar

you get a string, while with

key:: foo
key:: bar

you get a list ["foo","bar"]. This would also be easier to read, if the value is sentence-long

@kometenstaub
Copy link
Owner

There is an option to have one key with a list of values. That can be chosen per column. You'd get the array for dataview. Maybe readability isn't that great, but I don't think having multiple times the same key is a good idea. In normal YAML it would only recognise the last key in that case.
For dv inline YAML it may work, but I'm probably not going to support that.

@ooker777
Copy link
Author

There is an option to have one key with a list of values

What option are you mentioning? (I hope that I don't miss anything you have already said this time)

but I'm probably not going to support that

I understand and agree with you. I suppose with regex this can be a quick fix. I'm just wonder: assuming that you don't have to spend effort to make this works, but only need to add features based on their usefulness, how do you decide if a feature should be added or not?

@kometenstaub
Copy link
Owner

What option are you mentioning?

For every column it asks whether the values in the cell should be separately formatted and you can choose the delimiter for splitting them. But then it will have these multiple values associated with one key, not multiple times the same key.

how do you decide if a feature should be added or not?

It's based on whether I'd use it myself. This script only exists because I had written a custom script for someone, and decided to make a general-purpose script for others to profit as well. I don't use the script myself.

And regarding usefulness: the result is the same (different values broken up in a cell), just the way it is done is different. So this is just cosmetic :)

@kometenstaub kometenstaub added the wontfix This will not be worked on label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants