Lines Matching refs:token
66 foreach ($tokens as $token) {
69 if (preg_match('/^\d*\.?\d+(%|px|em|rem|ex|ch|vw|vh|pt|pc|cm|mm|in)$/', $token)) {
70 $attr['width'] = $token;
75 if (preg_match('/:([a-z\-]+)/', $token)) {
76 $attr['lang'] = trim($token,':');
81 if (preg_match('/#([A-Za-z0-9_-]+)/', $token)) {
82 $attr['id'] = trim($token,'#');
87 //restrict token (class names) characters to prevent any malicious data
88 if (preg_match('/[^A-Za-z0-9_-]/',$token)) continue;
90 $classIsInList = preg_match($restrictedClasses, $token);
95 $prefix = (!empty($noPrefix) && preg_match($noPrefix, $token)) ? '' : 'wrap_';
96 $attr['class'] = (isset($attr['class']) ? $attr['class'].' ' : '').$prefix.$token;