posthtml / posthtml-expressions

Use variables, JS-like expressions, and even markup-powered logic in your HTML.
Other
123 stars 20 forks source link

bug: auto add p tag #142

Closed 4xii closed 1 year ago

4xii commented 1 year ago
import posthtml from "posthtml";

const html = `
<p><div>1</div>sdfsdf</p>
`;

posthtml()
  .process(html)
  .then((res) => console.log(res.html));

// why log <p></p><div>1</div>sdfsdf<p></p>

codeSandbox