Skip to content

How to interpolate block-level components? #15

Description

@tamagokun

Willing to come up with a PR if there are any ideas around how this API would work.

Right now my workaround is to wrap the interpolated component with a <div> so that it will render inside a div rather than a p.

markdown`
<div>
${<MyBlockLevelComponent />}
</div>
`

I'm wondering if there is a way to "detect" the tag name of the rendered component, or if we need to rely on an option passed into the markdown function, such as markdown({nowrap: [MyBlockLevelComponent]})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions