Small issue with lists
Stanzilla opened this issue · 4 comments
Stanzilla commented
Hey there, I'm currently trying to create output like so:
output.push({ h1: "Collection" })
categories.forEach(cat => {
output.push({ h2: cat.name })
cat.files.forEach(file => {
output.push({ ul: [ {link: { title: file.name, source: file.path }}]})
})
})
Now, that is obviously adding a ul around every link, how would I .push the opening of an ul separate from the ending so I can keep my loop?
IonicaBizau commented
As far I remember, the lists are not interpreted deeply.
IonicaBizau commented
Sorry, actually they are.
I'm not sure what the problem is...
Stanzilla commented
To explain my problem with that a bit more: It just adds a ton of new lines after every li this way.
Stanzilla commented
Any workaround?