def", "abc\ndef", "Trailing whitespace before hard line break removed");
testText("
abc
def", "abc\ndef", "Leading whitespace after hard line break removed");
/****
****/
testText(" abc", " abc", "Leading whitespace preserved");
testText("abc ", "abc ", "Trailing whitespace preserved");
testText("abc def", "abc def", "Internal whitespace preserved");
testText("abc\ndef", "abc\ndef", "\\n preserved");
testText("abc\rdef", "abc\ndef", "\\r converted to newline");
testText("abc\tdef", "abc\tdef", "\\t preserved");
testText("abc
def
", "abc\ndef", "Two
siblings");
/**** ****/
testText("
abc", " abc", "Leading whitespace preserved");
testText("
abc ", "abc ", "Trailing whitespace preserved");
testText("
abc def", "abc def", "Internal whitespace preserved");
testText("
abc\ndef", "abc\ndef", "\\n preserved");
testText("
abc\rdef", "abc\ndef", "\\r converted to newline");
testText("
abc\tdef", "abc\tdef", "\\t preserved");
/****
****/
testText(" abc", " abc", "Leading whitespace preserved");
testText("abc ", "abc ", "Trailing whitespace preserved");
testText("abc def", "abc def", "Internal whitespace preserved");
testText("abc\ndef", "abc\ndef", "\\n preserved");
testText("abc\rdef", "abc\ndef", "\\r converted to newline");
testText("abc\tdef", "abc\tdef", "\\t preserved");
/**** ****/
testText("
abc", "abc", "Leading whitespace removed");
testText("
abc ", "abc", "Trailing whitespace removed");
testText("
abc def", "abc def", "Internal whitespace collapsed");
testText("
abc\ndef", "abc\ndef", "\\n preserved");
testText("
abc\rdef", "abc\ndef", "\\r converted to newline");
testText("
abc\tdef", "abc def", "\\t converted to space");
/**** Collapsing whitespace across element boundaries ****/
testText("
abc def", "abc def", "Whitespace collapses across element boundaries");
testText("
abc def", "abc def", "Whitespace collapses across element boundaries");
testText("
abc def", "abc def", "Whitespace collapses across element boundaries");
testText("
abc
def", "abc def", "Whitespace around
should not be collapsed");
testText("
abc
def", "abc def", "Whitespace around inline-block should not be collapsed");
testText("
abc
def ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed");
testText("
abc
", "abc", "Whitespace between
and block should be collapsed");
testText("
abc
", "abc", "Whitespace between inline-block and block should be collapsed");
testText("
abc
def", "abc def", "Whitespace around
should not be collapsed");
testText("
abc
def", "abc def", "Whitespace around
should not be collapsed");
testText("
abc", " abc", "Leading whitesapce should not be collapsed");
testText("
abc
", "abc ", "Trailing whitesapce should not be collapsed");
testText("
abc
def", "abc def", "Whitespace around empty span should be collapsed");
testText("
abc
def", "abc def", "Whitespace around empty spans should be collapsed");
testText("
abc", " abc", "