-
-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #176 from snshn/img-srcset
IMG srcset
- Loading branch information
Showing
10 changed files
with
138 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "monolith" | ||
version = "2.2.5" | ||
version = "2.2.6" | ||
edition = "2018" | ||
authors = [ | ||
"Sunshine <[email protected]>", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// ██████╗ █████╗ ███████╗███████╗██╗███╗ ██╗ ██████╗ | ||
// ██╔══██╗██╔══██╗██╔════╝██╔════╝██║████╗ ██║██╔════╝ | ||
// ██████╔╝███████║███████╗███████╗██║██╔██╗ ██║██║ ███╗ | ||
// ██╔═══╝ ██╔══██║╚════██║╚════██║██║██║╚██╗██║██║ ██║ | ||
// ██║ ██║ ██║███████║███████║██║██║ ╚████║╚██████╔╝ | ||
// ╚═╝ ╚═╝ ╚═╝╚══════╝╚══════╝╚═╝╚═╝ ╚═══╝ ╚═════╝ | ||
|
||
#[cfg(test)] | ||
mod passing { | ||
use crate::html; | ||
use reqwest::blocking::Client; | ||
use std::collections::HashMap; | ||
|
||
#[test] | ||
fn replace_with_empty_images() { | ||
let cache = &mut HashMap::new(); | ||
let client = Client::new(); | ||
let srcset_value = "small.png 1x, large.png 2x"; | ||
let embedded_css = html::embed_srcset(cache, &client, "", &srcset_value, true, true); | ||
|
||
assert_eq!( | ||
format!("{} 1x, {} 2x", empty_image!(), empty_image!()), | ||
embedded_css | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod embed_srcset; | ||
mod get_node_name; | ||
mod has_proper_integrity; | ||
mod is_icon; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters