Skip to content

Commit

Permalink
Merge pull request #724 from pinkary-project/chore/fix-link-preview
Browse files Browse the repository at this point in the history
fix: update regex to include <div> tags in hashtag parsing
  • Loading branch information
nunomaduro authored Nov 3, 2024
2 parents e7d3dcb + f7b236d commit 119f19a
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 119f19a

Please sign in to comment.