mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-06 08:41:11 +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;
|
begin = it;
|
||||||
}
|
}
|
||||||
if (token == "GH")
|
if (token == "GH" || token == "PR")
|
||||||
{
|
{
|
||||||
std::string uri(GITHUB_POCO_URI);
|
std::string uri(GITHUB_POCO_URI);
|
||||||
std::string::const_iterator it(begin);
|
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);
|
nextToken(begin, end, n);
|
||||||
if (!n.empty() && std::isdigit(n[0]))
|
if (!n.empty() && std::isdigit(n[0]))
|
||||||
{
|
{
|
||||||
uri += "/issues/";
|
uri += token == "GH" ? "/issues/" : "/pull/";
|
||||||
uri += n;
|
uri += n;
|
||||||
writeTargetLink(ostr, uri, token + " #" + n, "_blank");
|
writeTargetLink(ostr, uri, token + " #" + n, "_blank");
|
||||||
nextToken(begin, end, token);
|
nextToken(begin, end, token);
|
||||||
|
Loading…
Reference in New Issue
Block a user