posthtml
posthtml copied to clipboard
PostHTML is a tool to transform HTML/XML with JS plugins
### `Details` I think that `null` or `''` should be allowed as a type for cases where you want to remove the matching node using the `tree.match` or `tree.walk`, but...
when i use typescript, the method `process` second arg tip type error ### `Environment` |OS|node|npm/yarn|package| |:-:|:--:|:-:|:------:| |macos|16.13.2|yarn 1.22.18]|0.16.6|
fixes husky hooks (broken since https://github.com/posthtml/posthtml/pull/362) https://typicode.github.io/husky/#/?id=migrate-from-v4-to-v7
RT. ### `Details` I am contributing to one of the posthtml's plugin htmlnano, and I have found https://github.com/posthtml/htmlnano/issues/6. In that feature request, htmlnano needs to implement a feature by removing...
will be good to add example with `async/await` _Originally posted by @Grawl in https://github.com/posthtml/posthtml/issues/115#issuecomment-595582603_
I was try to use `gulp-posthtml`, to converting URLs in XML files. But it looks like not support self closing tags `` source:  result:  This is part of...
Expample: ```js // posthtml_module start var postHTML = function(plugins) { this.plugins = plugins; }; postHTML.prototype.parser = function(html) { return 'OLD' + html; }; // CHANGE postHTML.prototype.process = function(html, options) {...
`posthtml-renderer` Motivation is possibility to generation special markup in non standard situations. Custom renderer should add method with self name, ex: `posthtml().process(String).svg()`
Changes made. The latest commit adds a lot of complexity, but nice type inference. I also realized when doing some of this that it's not super clear when a return...