v0.25.1
This commit is contained in:
1 parent
87e571c170
commit
fa7abc9e53
308 files changed
+49746
-50237
No files matched your search
+1
-21
@@ -126,24 +126,4 @@ fn raw_tag(tag: &str) -> Option<(RawElement, bool, bool)> {
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn keeps_semantic_inline_whitespace() {
|
||||
let input = b"<span>Hello</span> <span>world</span>";
|
||||
assert_eq!(minify(input).unwrap().as_slice(), input);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn strips_only_safe_comments() {
|
||||
let input = b"<div><!-- remove --><b>x</b></div>";
|
||||
assert_eq!(minify(input).unwrap(), b"<div><b>x</b></div>");
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn preserves_comment_syntax_inside_script() {
|
||||
let input = b"<script>const value = '<!--keep-->';</script>";
|
||||
assert_eq!(minify(input).unwrap().as_slice(), input);
|
||||
}
|
||||
}
|
||||
include!("html/tests.rs");
|
||||
Reference in new issue
Block a user