public function processContent(string $content): string
    {
        $matches = Strings::matchAll($content, '#\[' . RegexPattern::PR_OR_ISSUE . '\]#m');
        foreach ($matches as $match) {
            $link = sprintf('[#%d]: %s/pull/%d', $match['id'], $this->repositoryUrl, $match['id']);
            $this->linkAppender->add($match['id'], $link);
        }

        return $content;
    }
public function processContent(string $content): string
    {
        $matches = Strings::matchAll($content, '#\[' . RegexPattern::PR_OR_ISSUE . '\]#m');
        foreach ($matches as $match) {
            $link = sprintf('[#%d]: %s/pull/%d', $match['id'], $this->repositoryUrl, $match['id']);
            $this->linkAppender->add($match['id'], $link);
        }

        return $content;
    }
public function processContent ( string $ content ) : string { $ matches = Strings :: matchAll ( $ content , '#\[' . RegexPattern :: PR_OR_ISSUE . '\]#m' ) ; foreach ( $ matches as $ match ) { $ link = sprintf ( '[#%d]: %s/pull/%d' , $ match [ 'id' ] , $ this -> repositoryUrl , $ match [ 'id' ] ) ; $ this -> linkAppender -> add ( $ match [ 'id' ] , $ link ) ; } return $ content ; }
Github can redirects PRs to issues, so no need to trouble with their separatoin
@inspiration for Regex: https://stackoverflow.com/a/406408/1348344
Github can redirects PRs to issues so no need to trouble with their separatoin