$matches = [];
$taglist = implode( '|', $elements );
- $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?" . ">)|<(!--)/i";
+ $start = "/<($taglist)(\\s+[^>]*?|\\s*?)(\/?>)|<(!--)/i";
while ( $text != '' ) {
$p = preg_split( $start, $text, 2, PREG_SPLIT_DELIM_CAPTURE );
$deps = [];
# Loop to fetch the article, with up to 1 redirect
- // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall
for ( $i = 0; $i < 2 && is_object( $title ); $i++ ) {
# Give extensions a chance to select the revision instead
$id = false; # Assume current
$anchor = $safeHeadline;
$fallbackAnchor = $fallbackHeadline;
if ( isset( $refers[$arrayKey] ) ) {
- // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
+ // phpcs:ignore Generic.Formatting.DisallowMultipleStatements
for ( $i = 2; isset( $refers["${arrayKey}_$i"] ); ++$i );
$anchor .= "_$i";
$linkAnchor .= "_$i";
$refers[$arrayKey] = true;
}
if ( $fallbackHeadline !== false && isset( $refers[$fallbackArrayKey] ) ) {
- // phpcs:ignore Generic.CodeAnalysis.ForLoopWithTestFunctionCall,Generic.Formatting.DisallowMultipleStatements
+ // phpcs:ignore Generic.Formatting.DisallowMultipleStatements
for ( $i = 2; isset( $refers["${fallbackArrayKey}_$i"] ); ++$i );
$fallbackAnchor .= "_$i";
$refers["${fallbackArrayKey}_$i"] = true;