Skip to content

Svelte named snippets (slot names) are not working #193

Description

@quadratz

Environment

  • OS: Linux, CachyOS x86_64
  • Node Version: v24.15.0
  • Package Manager: pnpm v11.1.2
  • Framework: SvelteKit (Svelte)

Comark Version

v0.3.2

Reproduction

https://github.com/quadratz/Minimum-Reproduction-Repository/tree/comark-svelte

Description

I followed the exact example for named snippets in Svelte provided at https://comark.dev/rendering/svelte#component-bindings-named-snippets, but the output is not as expected.

Steps to Reproduce

  1. Clone this repository https://github.com/quadratz/Minimum-Reproduction-Repository
  2. Checkout the branch comark-svelte
  3. Install the dependencies: pnpm install
  4. Start the development server: pnpm run dev
  5. Open a browser and navigate to http://localhost:5173/
  6. Notice that the footer is not rendered

Expected HTML Output

<div class="comark-content">
  <div class="card">
    <h3>My Card</h3>
    <p>Default slot content.</p>
    <footer>Footer slot content.</footer>
  </div>
</div>

Actual HTML Output

<div class="comark-content">
  <div class="card">
    <h3>My Card</h3>
    <p>Default slot content.</p>
    <template name="footer">Footer slot content.</template>
    <footer></footer>
  </div>
</div>

Additional context

No response

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions