Skip to content

Support multiple attributes on a node #65

@cossssmin

Description

@cossssmin

Using multiple attributes to transform contents doesn't work right now:

<div uppercase append=" - nice movie">fubar</div>
import content from 'posthtml-content'

const {html} = await posthtml(content({
    uppercase: content => content.toUpperCase(),
    append: (content, attribute) => content + attribute
  })).process(sourceHtml)

Not really sure what the result should be:

<div>FUBAR - NICE MOVIE</div>

or:

<div>FUBAR - nice movie</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