mirror of
https://github.com/pocoproject/poco.git
synced 2024-12-12 10:13:51 +01:00
enh(PocoDoc): support GitHub pull request links (PR #<id>)
This commit is contained in:
parent
809b37545b
commit
1c9dde18d1
@ -1264,7 +1264,7 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
|
||||
}
|
||||
begin = it;
|
||||
}
|
||||
if (token == "GH")
|
||||
if (token == "GH" || token == "PR")
|
||||
{
|
||||
std::string uri(GITHUB_POCO_URI);
|
||||
std::string::const_iterator it(begin);
|
||||
@ -1287,7 +1287,7 @@ void DocWriter::writeText(std::ostream& ostr, std::string::const_iterator begin,
|
||||
nextToken(begin, end, n);
|
||||
if (!n.empty() && std::isdigit(n[0]))
|
||||
{
|
||||
uri += "/issues/";
|
||||
uri += token == "GH" ? "/issues/" : "/pull/";
|
||||
uri += n;
|
||||
writeTargetLink(ostr, uri, token + " #" + n, "_blank");
|
||||
nextToken(begin, end, token);
|
||||
|
Loading…
Reference in New Issue
Block a user