mirror of
https://ghproxy.net/https://github.com/wp-cli/wp-config-transformer.git
synced 2026-07-27 13:07:13 +08:00
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.
17 lines
409 B
PHP
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';
|