In CSS <string> token values, WordPress\DataLiberation\CSS\CSSProcessor::get_token_value() reports an incorrect token value for \ + \n (it should be ignored in the token value).
See the rules for consuming a string token:
Repeatedly consume the next input code point from the stream:
…
U+005C REVERSE SOLIDUS (\)
…
Related to #223.
Demo
$p = WordPress\DataLiberation\CSS\CSSProcessor::create( "'str\\\ning'" );
$p->next_token();
assert( $p->get_token_type() === WordPress\DataLiberation\CSS\CSSProcessor::TOKEN_STRING );
assert( $p->get_token_value() === 'string', 'Expected "string", got ' . var_export( $p->get_token_value(), true ) );
Will throw AssertionError: Expected "string", got 'str\\\ning'.
Example of string value equality
"A\\nB" === "AB"
This should render with a fancy font, <i>not monospace</i>.
<style>
/* Note that the two "AB" strings match. */
body { font-family: 'A\
B', monospace;}
@font-face {
src: url(https://fonts.gstatic.com/s/lobster/v32/neILzCirqoswsqX9zoKmM4MwWJU.woff2) format('woff2');
font-family: 'AB';
}
</style>
In CSS
<string>token values,WordPress\DataLiberation\CSS\CSSProcessor::get_token_value()reports an incorrect token value for\+\n(it should be ignored in the token value).See the rules for consuming a string token:
Related to #223.
Demo
Will throw
AssertionError: Expected "string", got 'str\\\ning'.Example of string value equality
"A\\nB" === "AB"