Inconsistent results from the link() function #1024
-
I noticed a strange behavior in dataview: The unexpected behavior comes when calling Is this behavior intentional (it's a feature) or it's a bug? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
These are quirks of rendering, not of the functions.
|
Beta Was this translation helpful? Give feedback.
These are quirks of rendering, not of the functions.
link(string)
produces aLink
object. Dataview renders this as a HTML link.link(array)
just converts all elements inside the array to links, producing an array of links (Link[]
). Dataview renders arrays as a HTML list of links.join(link(array))
takes the array of links from above, and joins them all into a single string result (join(link(["hello", "goodbye"])) = join([[Hello]], [[Goodbye]]) = "[[Hello]], [[Goodbye]]"
). This is a string and not an array and so dataview renders it directly without a list.