Skip to content

Partial @html #13364

@CNSeniorious000

Description

@CNSeniorious000

Describe the problem

Currently this won't work at client-side, but works well during SvelteKit SSR (although it becomes a mess after hydrating)

{@html "<div>"}
{@html "<div>"}

  some text

{@html "</div>"}
{@html "</div>"}

https://svelte.dev/repl/b145cb48f30a4d5e80059b450eaaf4d2?version=4.2.19

Describe the proposed solution

I really need this in my GFM renderer for cases like this:

<details>
  <summary> title </summary>
  ```
  hello world
  ```

  > asdfasdf

  - 1
  - 2
</details>

Note that I don't use remark to compile markdown into html directly, but using it to parse markdown into mdast and render svelte components basing on that.

If html inside {@html html} can't be partial, I will have to parse the HTML into hast and recursively render them, which is much harder for me.

Importance

would make my life easier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions