posthtml-content
posthtml-content copied to clipboard
Support multiple attributes on a node
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>