Closed
Description
I encountered something interesting, thanks to a little-known hack that IE[7-9] uses.
Here's my snippet:
pub fn format_ident(ident: &str) -> String {
let mut 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.
Metadata
Metadata
Assignees
Labels
No labels