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

What's the syntax for a keyed each block in pug for this pre-processor? #574

Open
geoidesic opened this issue Feb 11, 2023 · 0 comments
Open

Comments

@geoidesic
Copy link

Screenshot 2023-02-11 at 18 12 46

The example shown in the docs:

<template lang="pug">
  div Posts +each('posts as post') a(href="{post.url}") {post.title}
</template>

What I'm trying to do:

{#each [...$wildcard] as item (item.id)}
                  <li animate:flip={{ duration: 200 }}>{item.name}</li>
 {/each}

So it's the item (item.id) bit which I can't figure out how to represent using svelte-preprocessor's syntax.

If this feature doesn't exist, please add it!
If it does, please document it here: https://github.com/sveltejs/svelte-preprocess/blob/main/docs/preprocessing.md#pug

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

No branches or pull requests

1 participant