blob: 86b16c5c5fa9681be8fe8bcaa92834bdf11d2489 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
using Printf
function hfun_author_date()
return readchomp(`git log -1 --date=short --format=%ad $(locvar(:fd_rpath))`)
end
function hfun_abslink(args)
path = args[1]
return @sprintf("<a href=/%s>%s</a>", path, pagevar(path, "title"))
end
function hfun_pep(args)
postfix = length(args) < 2 ? "" : '#' * args[2]
return @sprintf(
"<a href=https://www.python.org/dev/peps/pep-%04d%s>PEP %s%s</a>",
Meta.parse(args[1]), postfix, args[1], postfix)
end
function hfun_github(args)
return @sprintf("<a href=https://github.com/%s>@%s</a>",
args[1], args[1])
end
function hfun_pip(args)
content = length(args) < 2 ? "GH-" * args[1] : args[2]
return @sprintf("<a href=https://github.com/pypa/pip/pull/%s>%s</a>",
args[1], content)
end
|