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

Small issue with lists #53

Open
Stanzilla opened this issue Nov 29, 2019 · 4 comments
Open

Small issue with lists #53

Stanzilla opened this issue Nov 29, 2019 · 4 comments
Labels

Comments

@Stanzilla
Copy link

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
Copy link
Owner

As far I remember, the lists are not interpreted deeply.

@IonicaBizau
Copy link
Owner

Sorry, actually they are.

I'm not sure what the problem is...

@Stanzilla
Copy link
Author

To explain my problem with that a bit more: It just adds a ton of new lines after every li this way.

@Stanzilla
Copy link
Author

Any workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants