Skip to content

Commit df9d8c9

Browse files
committed
Update PRE leading newline test
1 parent 993fe2b commit df9d8c9

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

tests/phpunit/tests/html-api/wpHtmlTemplate.php

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -749,28 +749,11 @@ public static function data_pre_element_leading_newline() {
749749
"<pre>line1\nline2</pre>",
750750
),
751751

752-
/*
753-
* This may seem wrong, but the template is processed like HTML. The leading newline
754-
* is removed.
755-
* The newline inside the replacement is rendered as HTML and is also removed.
756-
*
757-
* The correct way to do this for a PRE tag is:
758-
* - Leading newline in template is irrelevant.
759-
* - Replacement must include an extra newline to lead with a newline in the output.
760-
*
761-
* See the next case.
762-
*/
763752
'PRE with newline and newline in replacement' => array(
764753
"<pre>\n</%code></pre>",
765754
array( 'code' => "\nline1\nline2" ),
766755
"<pre>\n\nline1\nline2</pre>",
767756
),
768-
769-
'PRE with newline and double-newline in replacement' => array(
770-
"<pre>\n</%code></pre>",
771-
array( 'code' => "\nline1\nline2" ),
772-
"<pre>\n\nline1\nline2</pre>",
773-
),
774757
);
775758
}
776759

0 commit comments

Comments
 (0)