Skip to content

Support nested transformations #66

@cossssmin

Description

@cossssmin

Would be great to be able to do something like this:

<div uppercase>
  Some
  <br>
  <span reverse>text</span>
</div>
import content from 'posthtml-content'

const {html} = await posthtml(content({
    uppercase: content => content.toUpperCase(),
    reverse: content => content.split('').reverse().join('')
  })).process(sourceHtml)

... and get:

<div>
  SOME
  <br>
  <span>TXET</span>
</div>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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