htmlq
htmlq copied to clipboard
Class selector missing result when child of `<template></template>`
When attempting to select an element as a child of a <template> tag, htmlq does not return the result.
The following snippet is a minimal reproducible example, and taken from the GitHub home page.
<template>
<details-dialog>
<div class="octocat-spinner"></div>
</details-dialog>
</template>
When attempting to select the .octocat-spinner element, no results are returned. This is also the case when changing the selector and element to use an ID.
$ cat github.com | htmlq '.octocat-spinner'
However, when you remove the surrounding template tags, the element is found.