andes
Shallow nested HTML documents often limit styling options. andes unflatten HTML documents and generate the minimum amount of wrapper elements to enable infinite styling options.
npm install --save andes
Usage
const andes = ;const html = '<h1>Heading</h1><p>Lorem ipsum dolore</p>';;
Example
andes will turn this document
First heading 1Second heading 1First Heading 2Lorem ipsumSecond Heading 2Lorem ipsum
Into this one
First heading 1 Second heading 1 First Heading 2 Lorem ipsum Second Heading 2 Lorem ipsum