crisward / svelte-tag

MIT License
52 stars 8 forks source link

FIX for #7: Address nested slot issues and more #18

Closed patricknelson closed 1 year ago

patricknelson commented 1 year ago

Closed this out in favor of https://github.com/patricknelson/svelte-retag/pull/5 on separate svelte-retag package. Original description is below.


🚨 Warning: This is a work in progress, intended as a proof of concept for now only 🚨

Primarily addresses #7 by doing the following:

  1. Ensure properly selecting own slots and not that of descendants and
  2. Ensure we're setting up and tearing down state on connect/disconnect, necessary when nested elements render from inside out.
  3. Consistent line endings with semicolons (right now it is mixed, probably due to copy/paste).
  4. This depends on changes from #15

This may necessitate further refactor later. Right now it's still using my own IDE's code style so -- sorry about that. Please consider adopting this but if you'd prefer, I can still reformat to match repo style if desired. See whitespace ignored version here for cleaner diff: https://github.com/crisward/svelte-tag/pull/18/files?diff=split&w=1

patricknelson commented 1 year ago

Closing this out in favor of https://github.com/patricknelson/svelte-retag/pull/5 on separate svelte-retag package.