mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-24 06:54:00 +00:00
Merge "Use \d shortcut in regular expressions"
This commit is contained in:
commit
1fe6947693
|
@ -340,8 +340,8 @@ class Cite {
|
|||
return $this->error( 'cite_error_ref_no_key' );
|
||||
}
|
||||
|
||||
if ( is_string( $key ) && preg_match( '/^[0-9]+$/', $key ) ||
|
||||
is_string( $follow ) && preg_match( '/^[0-9]+$/', $follow )
|
||||
if ( is_string( $key ) && preg_match( '/^\d+$/', $key ) ||
|
||||
is_string( $follow ) && preg_match( '/^\d+$/', $follow )
|
||||
) {
|
||||
# Numeric names mess up the resulting id's, potentially produ-
|
||||
# cing duplicate id's in the XHTML. The Right Thing To Do
|
||||
|
|
Loading…
Reference in a new issue