Skip to content

Commit

Permalink
fix: update regex to include <div> tags in hashtag parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
MrPunyapal committed Nov 3, 2024
1 parent e7d3dcb commit f7b236d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public function parse(string $content): string
{
return (string) preg_replace_callback(
'/(<(a|code|pre)\s+[^>]*>.*?<\/\2>)|(?<!&)#([a-z0-9]+)/is',
'/(<(a|code|pre|div)\s+[^>]*>.*?<\/\2>)|(?<!&)#([a-z0-9]+)/is',
function (array $matches): string {
if ($matches[1] !== '') {
return $matches[1];
Expand Down

0 comments on commit f7b236d

Please sign in to comment.