We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 311de67 commit 882766dCopy full SHA for 882766d
app/Support/GitHub/Release.php
@@ -52,7 +52,13 @@ public function getBodyForMarkdown(): string
52
// Convert any URLs to Markdown links
53
if ($this->convertLinks) {
54
$body = preg_replace(
55
- '/(https?:\/\/[^\s]+)/',
+ '/https?:\/\/[^\s]+\/pull\/(\d+)/',
56
+ '[#$1]($0)',
57
+ $body
58
+ );
59
+
60
+ $body = preg_replace(
61
+ '/(https?:\/\/(?![^\s]+\/pull\/\d+)[^\s]+)/',
62
'[$1]($1)',
63
$body
64
);
@@ -67,7 +73,7 @@ public function getBodyForMarkdown(): string
67
73
68
74
}
69
75
70
- return str_replace('#', '##', $body);
76
+ return preg_replace('/^#/m', '##', $body);
71
77
72
78
79
public function withoutUserLinks(bool $withoutUserLinks = true): static
0 commit comments