Lighter Pug for browser/Electron. With Pug filters' support.
importHyperPugfrom'hyperpug'consthp=newHyperPug()console.log(hp.parse(HYPERPUG_STRING))Filters are normalized for Markdown and other indented languages are well.
importHyperPugfrom'hyperpug'consthp=newHyperPug({markdown: (s)=>{returnmarkdownMaker(s)}})console.log(hp.parse(HYPERPUG_STRING))<divid="hyperpug"></div><scriptsrc="https://unpkg.com/hyperpug"></script><script>consthp=newHyperPug({markdown: (s)=>{returnmarkdownMaker(s)}})document.getElementById("hyperpug").innerHTML=hp.parse(`style. .red { color: red; } section { margin-bottom: 1rem; }section(class="x") div hello blockquote .red goodbye :markdown # This is some headingsmall Yes, this is a good idea.`)</script>