Fix possible wrapping of MANNEDINCLUDE by removing space
This doesn't really guarantee that it won't wrap, but fixes at least one man page. - https://manned.org/BlockSelectionDCOPInterface/6dfdf921
This commit is contained in:
parent
5436435c3f
commit
a7352d27b9
2 changed files with 3 additions and 3 deletions
|
|
@ -100,7 +100,7 @@ static void flushinclude(ctx_t *x) {
|
|||
char *s = x->line;
|
||||
|
||||
s[x->linelen-3] = 0;
|
||||
s += 17;
|
||||
s += 16;
|
||||
char *fn = strrchr(s, '/');
|
||||
fn = fn ? fn+1 : s;
|
||||
sv_catpv(x->dest, ">> Included manual page: <a href=\"/");
|
||||
|
|
@ -133,7 +133,7 @@ static void flushline(ctx_t *x) {
|
|||
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) {
|
||||
if(x->linelen > 20 && *s == '[' && strncmp(s, "[[[MANNEDINCLUDE", 16) == 0 && strcmp("]]]", s+x->linelen-3) == 0) {
|
||||
flushinclude(x);
|
||||
goto end;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue