Open hughrawlinson opened 7 years ago
Yea this would be a welcome addition.
Progress on this? Best I could come up with in the meantime:
html="<h1>hi</h1><h2>there</h2>"
diff --unchanged-group-format="" \
<(echo "$html" - | pup --indent 0 'h2') \
<(echo "$html" - | pup --indent 0 '*')` | pup
--indent 0
is redundant in this example, but in multiline html changing indents will create no match, so I guess you could say... it makes a diff
(sorry). The final pup
pipe will re-indent the html for ya
@nick-bull #81 implements this. I see that Eric has just started making commits again, hopefully he'll merge the open PRs soon and make a new release. In the meantime pulling and building my branch should get you what you need.
I merged this into https://github.com/frioux/pup, fyi
Similar to grep's -v (inverse grep), I'd love an 'inverse select' option for pup. Something like: