$log = LoggerFactory::getInstance( 'languageconverter' );
$log->error( "Hit pcre.backtrack_limit in " . __METHOD__
. ". Disabling language conversion for this page.",
- array(
+ [
"method" => __METHOD__,
"variant" => $toVariant,
"startOfText" => substr( $text, 0, 500 )
- )
+ ]
);
return $text;
}
$noScript = '<script.*?>.*?<\/script>(*SKIP)(*FAIL)';
$noStyle = '<style.*?>.*?<\/style>(*SKIP)(*FAIL)';
+ // @codingStandardsIgnoreStart Generic.Files.LineLength.TooLong
$noHtml = '<(?:[^>=]*+(?>[^>=]*+=\s*+(?:"[^"]*"|\'[^\']*\'|[^\'">\s]*+))*+[^>=]*+>|.*+)(*SKIP)(*FAIL)';
+ // @codingStandardsIgnoreEnd
while ( $startPos < $length && $continue ) {
$continue = preg_match(
// Only match -{ outside of html.
$testString .= 'xxx xxx xxx';
}
$testString .= "\n<big id='в'></big>";
- $old = ini_set('pcre.backtrack_limit', 200 );
+ $old = ini_set( 'pcre.backtrack_limit', 200 );
$result = $this->lc->autoConvert( $testString, 'tg-latn' );
ini_set( 'pcre.backtrack_limit', $old );
// The в in the id attribute should not get converted to a v