optimize the telegraph link extraction
This commit is contained in:
parent
b93ea90af5
commit
237539501b
|
|
@ -41,7 +41,7 @@ class TelegramLinkFixerExtension extends Minz_Extension
|
|||
}
|
||||
|
||||
// First try: Look for Telegraph link with "Telegraph" text
|
||||
if (preg_match('/<a[^>]*?href="(https:\/\/telegra\.ph\/[^"]+)"[^>]*>Telegraph<\/a>/i', $description, $matches)) {
|
||||
if (preg_match('/href="(https:\/\/telegra\.ph\/[^"]+)"[^>]*>Telegraph</i', $description, $matches)) {
|
||||
$telegraphLink = $matches[1];
|
||||
}
|
||||
// Second try: Look for any Telegraph link in the first paragraph
|
||||
|
|
|
|||
Loading…
Reference in New Issue