Better regex (allow more than two extensions)

This commit is contained in:
Richard Holloway 2017-01-11 00:06:41 +07:00 committed by Dmitry Khomutov
parent 31e527151d
commit eea29dabe8

View file

@ -60,7 +60,7 @@ class PhpParallelLint extends Plugin
if (isset($options['extensions'])) {
// Only use if this is a comma delimited list
$pattern = '/^[a-z]*,\ *[a-z]*$/';
$pattern = '/^([a-z]+)(,\ *[a-z]*)*$/';
if (preg_match($pattern, $options['extensions'])) {
$this->extensions = str_replace(' ', '', $options['extensions']);