Fixed css replacement with more than one linked asset
This commit is contained in:
parent
7412d663e0
commit
4decea716c
1 changed files with 3 additions and 1 deletions
|
@ -145,8 +145,10 @@ pub fn resolve_css_imports(
|
|||
|
||||
let replacement = format!("\"{}\"", &content);
|
||||
let dest = link.name("to_repl").unwrap();
|
||||
let offset = resolved_css.len() - css_string.len();
|
||||
let target_range = (dest.start() + offset)..(dest.end() + offset);
|
||||
|
||||
resolved_css.replace_range(dest.start()..dest.end(), &replacement);
|
||||
resolved_css.replace_range(target_range, &replacement);
|
||||
}
|
||||
|
||||
if as_dataurl {
|
||||
|
|
Loading…
Reference in a new issue