Hereās a snippet I use to make lists render as comma separated items instead of bullet points:
dv.table(
['File', 'Connections'],
dv.pages('[[Foo]]').map((page) => {
return [
`[[${page.file.name}]]`,
page.file.outlinks
.reduce((acc, outlink) => {
acc += `[[${outlink.path.replace(/\.md$/, '')}]], `;
return acc;
}, '')
.trim()
.replace(/,$/, '')
];
})
);
Now this is very close to:
Table file.outlinks as Connections
From [[Foo]]
Except that the list renders differently. Obviously that is a lot of code to write just for a format change, but I like how the table looks quite a bit more with that.
Hereās a slightly cleaner version with .map():
dv.table(
['File', 'Connections'],
dv.pages('[[Foo]]').map((page) => {
return [
`[[${page.file.name}]]`,
page.file.outlinks
.map((link) => {
return `[[${link.path.replace(/\.md$/, '')}]]`;
})
.join(', ')
];
})
);
But all are superseded by @Rishiās suggestion of the undocumented join():