Skip to content

Wrap 2 siblings into one parent #3

@ManasMadrecha

Description

@ManasMadrecha

Reproduction

['rehype-wrap-all', { selector: 'blockquote, blockquote+figcaption', wrapper: 'figure' }]

What is expected?

This should be converted

<blockquote>I am a blockquote</blockquote>
<figcaption></figcaption>

to this

<figure>
<blockquote>I am a blockquote</blockquote>
<figcaption></figcaption>
</figure>

What is happening?

This is being converted

<blockquote>I am a blockquote</blockquote>
<figcaption></figcaption>

to this

<figure>
<blockquote>I am a blockquote</blockquote>
</figure>
<figure>
<figcaption></figcaption>
</figure>

Need

Is there any way to wrap 2 siblings into one parent by this plugin. If not, is there any plugin to do so? I am using Nuxt + its Content module. Thank you

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