MCPcopy Create free account
hub / github.com/Stranger6667/css-inline / skip_existing_height_attribute

Function skip_existing_height_attribute

css-inline/tests/test_inlining.rs:1868–1875  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1866
1867#[test]
1868fn skip_existing_height_attribute() {
1869 // Don't override existing HTML attributes
1870 let inliner = CSSInliner::options().apply_height_attributes(true).build();
1871 let html = r#"<html><head><style>img { height: 100px; }</style></head><body><img height="200"></body></html>"#;
1872 let result = inliner.inline(html).unwrap();
1873 assert!(result.contains(r#"height="200""#));
1874 assert!(!result.contains(r#"height="100""#));
1875}
1876
1877#[test]
1878fn ignore_complex_css_values() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
inlineMethod · 0.45

Tested by

no test coverage detected