comparison vendor/symfony/css-selector/Parser/Shortcut/ClassParser.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 4c8ae668cc8c
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
39 // 0 => string 'test|input.ab6bd_field' (length=22) 39 // 0 => string 'test|input.ab6bd_field' (length=22)
40 // 1 => string 'test' (length=4) 40 // 1 => string 'test' (length=4)
41 // 2 => string 'input' (length=5) 41 // 2 => string 'input' (length=5)
42 // 3 => string 'ab6bd_field' (length=11) 42 // 3 => string 'ab6bd_field' (length=11)
43 if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) { 43 if (preg_match('/^(?:([a-z]++)\|)?+([\w-]++|\*)?+\.([\w-]++)$/i', trim($source), $matches)) {
44 return array( 44 return [
45 new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])), 45 new SelectorNode(new ClassNode(new ElementNode($matches[1] ?: null, $matches[2] ?: null), $matches[3])),
46 ); 46 ];
47 } 47 }
48 48
49 return array(); 49 return [];
50 } 50 }
51 } 51 }