wp-config-transformer/tests/fixtures/wp-config-concat.php
Phil Tyler 08b0a8d4e7
Allow escape subpattern to match backslash-newline in quoted strings
Replace \. with [\s\S] in the unrolled-loop escape subpattern so
a literal backslash immediately followed by a newline inside a
quoted string is matched by the quoted-string branch rather than
falling through to the general fallback.

Add test cases for backslash-newline in a quoted string and for
variable resolution after such a string.
2026-04-09 15:46:59 -07:00

17 lines
409 B
PHP

<?php
$do_redirect = 'https://example.com' . $_SERVER['REQUEST_URI'];
$table_prefix = 'wp_';
define( 'DB_NAME', 'test_db' );
define( 'CUSTOM_CSS', 'body {
color: red;
}' );
$after_multiline = 'found';
$long_url = 'https://example.com'
. '/path';
define( 'ALLOWED_HOSTS', array(
'example.com',
) );
$after_array_define = 'found';
$backslash_newline = 'line1\
line2';
$after_backslash_newline = 'found';