mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Make #[css(represents_keyword)] convert underscore in the field name to dash
Differential Revision: https://phabricator.services.mozilla.com/D128668
This commit is contained in:
parent
1bd1441d0b
commit
155fbf8804
1 changed files with 1 additions and 1 deletions
|
@ -208,7 +208,7 @@ fn derive_single_field_expr(
|
|||
.ident
|
||||
.as_ref()
|
||||
.expect("Unnamed field with represents_keyword?");
|
||||
let ident = cg::to_css_identifier(&ident.to_string());
|
||||
let ident = cg::to_css_identifier(&ident.to_string()).replace("_", "-");
|
||||
quote! {
|
||||
if *#field {
|
||||
writer.raw_item(#ident)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue