Treat <textarea> as whitespace-sensitive
This commit is contained in:
parent
080d4e0c96
commit
85b1c6658c
|
@ -71,7 +71,6 @@ lazy_static! {
|
|||
m.insert(b"option", CONTENT);
|
||||
m.insert(b"p", CONTENT);
|
||||
m.insert(b"summary", CONTENT);
|
||||
m.insert(b"textarea", CONTENT);
|
||||
m.insert(b"video", CONTENT);
|
||||
|
||||
// Content-first tags.
|
||||
|
@ -158,6 +157,7 @@ lazy_static! {
|
|||
m.insert(b"ul", LAYOUT);
|
||||
|
||||
// Whitespace-sensitive tags.
|
||||
m.insert(b"textarea", WHITESPACE_SENSITIVE);
|
||||
m.insert(b"code", WHITESPACE_SENSITIVE);
|
||||
m.insert(b"pre", WHITESPACE_SENSITIVE);
|
||||
|
||||
|
|
|
@ -88,6 +88,7 @@ fn test_collapse_destroy_whole_and_trim_whitespace() {
|
|||
#[test]
|
||||
fn test_no_whitespace_minification() {
|
||||
eval(b"<pre> \n  \t </pre>", b"<pre> \n \t </pre>");
|
||||
eval(b"<textarea> \n  \t </textarea>", b"<textarea> \n \t </textarea>");
|
||||
// Tag names should be case insensitive.
|
||||
eval(b"<pRe> \n  \t </PRE>", b"<pre> \n \t </pre>");
|
||||
eval(b"<pre> <span> 1 2 </span> </pre>", b"<pre> <span> 1 2 </span> </pre>");
|
||||
|
|
Loading…
Reference in New Issue