diff options
author | Yorhel <git@yorhel.nl> | 2012-06-16 09:27:43 +0200 |
---|---|---|
committer | Yorhel <git@yorhel.nl> | 2012-06-16 09:27:43 +0200 |
commit | 31e0d5ff084e2a5a23edfe733c7f047e2440e563 (patch) | |
tree | f2a97a41cef8e0b249797d4cb644ecc67fc7fe45 /lib | |
parent | 767fbe595d065d4f6b70c99e2aea2debb6801a4b (diff) |
Actually turn .so's into links
Diffstat (limited to 'lib')
-rw-r--r-- | lib/GrottyParser/GrottyParser.xs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/GrottyParser/GrottyParser.xs b/lib/GrottyParser/GrottyParser.xs index a8ad132..4ec8489 100644 --- a/lib/GrottyParser/GrottyParser.xs +++ b/lib/GrottyParser/GrottyParser.xs @@ -101,6 +101,16 @@ static void flushline(ctx_t *x) { static const char eol[] = "\n"; char *s = x->line, *es = x->line; + // Special-case [[[MANNEDINCLUDE ..]]] directive + if(x->linelen > 20 && *s == '[' && strncmp(s, "[[[MANNEDINCLUDE ", 17) == 0 && strcmp("]]]", s+x->linelen-3) == 0) { + s[x->linelen-3] = 0; + s += 17; + char *fn = strrchr(s, '/'); + fn = fn ? fn+1 : s; + sv_catpvf(x->dest, ">> Included manual page: <a href=\"/%s\">%s</a>", fn, s); + goto end; + } + if(x->noref) { flushchunk(x, x->line, x->flags, x->line+x->linelen); goto end; |