parseInline($matches[1]), ], strlen($matches[0]) ]; } } else { // emph if ($marker == '*' && preg_match('/^[*]((?:[^*]|[*][*][^*]+?[*][*])+?)[*](?![*])/s', $text, $matches) || $marker == '_' && preg_match('/^_((?:[^_]|__[^_]*__)+?)_(?!_)\b/us', $text, $matches)) { return [ [ 'emph', $this->parseInline($matches[1]), ], strlen($matches[0]) ]; } } return [['text', $text[0]], 1]; } protected function renderStrong($block) { return '' . $this->renderAbsy($block[1]) . ''; } protected function renderEmph($block) { return '' . $this->renderAbsy($block[1]) . ''; } }