*/ public function handles(string $text): array { $urls = collect($this->urls->all($text))->flatMap(fn (string $url): array => [$url, (string) preg_replace('/^https?:\/\//i', '', $url)])->all(); $prose = str_replace($urls, '', $this->codeSpans->withoutCode($text)); preg_match_all('/(?-])#(\p{L}[\p{L}\p{M}\p{N}_]*)/u', $prose, $matches); return array_values(array_unique(array_map(mb_strtolower(...), $matches[1]))); } }