config['regexps']; $tagName = $this->config['tagName']; $attrName = $this->config['attrName']; $onlyFirst = !empty($this->config['onlyFirst']); $keywords = []; foreach ($regexps as $regexp) { \preg_match_all($regexp, $text, $matches, \PREG_OFFSET_CAPTURE); foreach ($matches[0] as $_11955a1f) { list($value, $pos) = $_11955a1f; if ($onlyFirst) { if (isset($keywords[$value])) continue; $keywords[$value] = 1; } $this->parser->addSelfClosingTag($tagName, $pos, \strlen($value)) ->setAttribute($attrName, $value); } } } }