Implement Default and spec_compliant for Cfg

This commit is contained in:
Wilson Lin 2021-08-10 14:23:33 +10:00
parent 724c5ec4e4
commit 563f7dfc2a
1 changed files with 14 additions and 0 deletions

View File

@ -43,4 +43,18 @@ impl Cfg {
remove_processing_instructions: false,
}
}
pub fn spec_compliant() -> Cfg {
Cfg {
ensure_spec_compliant_unquoted_attribute_values: true,
keep_spaces_between_attributes: true,
..Cfg::new()
}
}
}
impl Default for Cfg {
fn default() -> Self {
Self::new()
}
}