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
I encountered something interesting, thanks to a little-known hack that IE[7-9] uses.
Here's my snippet:
pubfnformat_ident(ident:&str) -> String{letmut res:String = String::new();let _ = serialize_identifier(ident,&mut res);
res = res.trim_end().to_string();// <-- Had to add this line
res
}
Appears to be that passing value \9 via Token::Ident to that function results in serialize_identifier() writing \9 rather than \9, hence it was breaking the original CSS hack. The test query I used is this one: div#p>svg>foreignObject>section:not(\9) and pushing that through the serialize_identifier without trim_end() was resulting in div#p>svg>foreignObject>section:not(\9 ) and hence was breaking that IE hack. I couldn't find where my code was adding extra space at the end for tabs, hence went with right-trimming it for now.
The text was updated successfully, but these errors were encountered:
It looks like the optional space after the identifier can be trimmed without it breaking the desired behavior, while it makes the IE hack work. I'm gonna go ahead close this issue.
I encountered something interesting, thanks to a little-known hack that IE[7-9] uses.
Here's my snippet:
Appears to be that passing value
\9
viaToken::Ident
to that function results inserialize_identifier()
writing\9
rather than\9
, hence it was breaking the original CSS hack. The test query I used is this one:div#p>svg>foreignObject>section:not(\9)
and pushing that through the serialize_identifier without trim_end() was resulting indiv#p>svg>foreignObject>section:not(\9 )
and hence was breaking that IE hack. I couldn't find where my code was adding extra space at the end for tabs, hence went with right-trimming it for now.The text was updated successfully, but these errors were encountered: