Pug doesnt handle tags with hyphen in it.
For instance, this page is AMP and has tags such as amp-img, amp-analytics in it.
$ curl https://www.newyorker.com/news/current/mark-zuckerberg-announces-facebooks-pivot-to-privacy/amp | grep amp-img
# shows results
However pup doesnt recognize them
$ curl https://www.newyorker.com/news/current/mark-zuckerberg-announces-facebooks-pivot-to-privacy/amp | pup 'amp-img'
# Nothing
Here's a simpler test case -
$ echo "<html><h1>foo</h1><foo-bar>hi there</foo-bar></html>" | pup 'body'
<body>
<h1>
foo
</h1>
<foo-bar>
hi there
</foo-bar>
</body>
$ echo "<html><h1>foo</h1><foo-bar>hi there</foo-bar></html>" | pup 'foo-bar'
# nothing
Pug doesnt handle tags with hyphen in it.
For instance, this page is AMP and has tags such as
amp-img,amp-analyticsin it.However
pupdoesnt recognize themHere's a simpler test case -