natemoo-re / astro-remote

Render remote HTML or Markdown content in Astro with full control over the output
MIT License
181 stars 9 forks source link

Support for ~~`Fragment`~~ and named slots #4

Open JulianCataldo opened 2 years ago

JulianCataldo commented 2 years ago

Hey there!

Actually, passing the Fragment component like this doesn't seems to work:

  <Markdown
    content={content}
    components={{
      // ...,
      Fragment,
      Tabs,
    }}
  />

In a MD:

<Fragment slot="tab-1">Tab 1</Fragment>

Fragment is skipped Using a real elem. like div fixes this. However named slots are not supported. The default one are working well.


EDIT: Ok, I've done some test, and passing Fragment is effective, it's the named slots which are the culprit.