Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not handle fragments #77

Open
joeframbach opened this issue Sep 18, 2024 · 0 comments
Open

Does not handle fragments #77

joeframbach opened this issue Sep 18, 2024 · 0 comments

Comments

@joeframbach
Copy link

I have a html fragment, not a whole document, and I want to get an attribute from the element.

This works for divs:

% echo '<div data-val="foo"></div>' | htmlq -a data-val div
foo

However, it does not work for trs:

% echo '<tr data-val="foo"></tr>' | htmlq -a data-val tr
(no output)

htmlq doesn't even echo the tr:

% echo '<div></div>' | htmlq div
<div></div>

% echo '<tr></tr>' | htmlq tr
(no output)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant