You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug? Selector parsing error: Expected selector indicator after ']' #160
While developing an html <table> to JSON extractor, I've found something that seems a bug. I could share here the original HTML source, but I think it's better to provide a simplified example:
# HTML to exemplify
cat >input.html <<HTML<table> <tr> <th>X</th> <th>Y</th> </tr> <tr> <td>0</td> <td>0</td> </tr> <tr> <tdcolspan="2">Hey, Let's break your ninja script</td> </tr> <tr> <td>1</td> <td>0</td> </tr></table>HTML
# works as expected
$ <input.html pup 'table tr:not(:parent-of([colspan])) json{}'
# But fails when combined
$ <input.html pup 'table tr:not(:parent-of([colspan])):not(:parent-of(th))'
Selector parsing error: Unmatched open brace '['
$ pup --version
0.4.0
$ uname -srvpio
Linux 5.4.0-84-generic #94~18.04.1-Ubuntu SMP Thu Aug 26 23:17:46 UTC 2021 x86_64 x86_64 GNU/Linux
Please let me know if I can help adding a test case.
L.
Activity
Anshuman-bansal commentedon Sep 26, 2021
it is not installing on mac i have installed go and brew both and used both way but error comes

lorenzogrv commentedon Sep 29, 2021
@objectgrind I'm pretty sure your problem is not related to this particular issue I've opened