Closed suntong closed 7 years ago
PS, here is how I tested it, FYI,
$ echo '<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 100%; border: 0 dashed; border-color: #FFFFFF"><tr style="height:64px">aaa</tr></table>' | cascadia -i -o -c 'table[border="0"][cellpadding="0"][cellspacing="0"]'
1 elements for 'table[border="0"][cellpadding="0"][cellspacing="0"]':
<table border="0" cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 100%; border: 0 dashed; border-color: #FFFFFF"><tbody><tr style="height:64px"></tr></tbody></table>
That cascadia
command above is what I build a thin wrapper around you cascadia
package -- https://github.com/suntong/cascadia.
If you could mention that in your readme file, that'd be very appreciated, and I believe it might help a lot of people. Thx.
The problem is that 0
is not a valid identifier. An identifier must begin with a letter.
Safari doesn't accept the selector in your example either:
> document.querySelector("table[border=0][cellpadding=0][cellspacing=0]")
< SyntaxError (DOM Exception 12): The string did not match the expected pattern.
Is this claim to be true:
-- taken from here
I have a multiple attribute selector as "
table[border=0][cellpadding=0][cellspacing=0]
", and cascadia is failing with the following message:At first I thought it was issues #24, but it turns out to be zero value of specified attribute. I.e., if I change the CSS selector to
table[border="0"][cellpadding="0"][cellspacing="0"]
, it will work.Do you think it is worthwhile for you to double-check please? I assume there's a problem because
xidel
handlestable[border=0][cellpadding=0][cellspacing=0]
without any problem. Thx.