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

Function skip_existing_width_attribute

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

Source from the content-addressed store, hash-verified

1856
1857#[test]
1858fn skip_existing_width_attribute() {
1859 // Don't override existing HTML attributes
1860 let inliner = CSSInliner::options().apply_width_attributes(true).build();
1861 let html = r#"<html><head><style>img { width: 100px; }</style></head><body><img width="200"></body></html>"#;
1862 let result = inliner.inline(html).unwrap();
1863 assert!(result.contains(r#"width="200""#));
1864 assert!(!result.contains(r#"width="100""#));
1865}
1866
1867#[test]
1868fn skip_existing_height_attribute() {

Callers

nothing calls this directly

Calls 3

buildMethod · 0.45
inlineMethod · 0.45

Tested by

no test coverage detected