1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

[dump] Check for end of link at the end of loop, not at the begining (off by one). Refs #198

This commit is contained in:
Witold Filipczyk 2022-11-28 08:32:02 +01:00
parent 8e619e4d02
commit 023991e5c5

View File

@ -70,9 +70,6 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (is_start_of_link(document, x, y, &current_link_number, &next_link)) { if (is_start_of_link(document, x, y, &current_link_number, &next_link)) {
write_start_of_link(next_link, out); write_start_of_link(next_link, out);
} }
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
} }
#ifdef DUMP_CHARSET_UTF8 #ifdef DUMP_CHARSET_UTF8
unicode_val_T c; unicode_val_T c;
@ -180,6 +177,11 @@ DUMP_FUNCTION_SPECIALIZED(struct document *document, struct dump_output *out)
if (write_char(c, out)) if (write_char(c, out))
return -1; return -1;
#endif /* !DUMP_CHARSET_UTF8 */ #endif /* !DUMP_CHARSET_UTF8 */
if (dumplinks) {
if (is_end_of_link(document, x, y, &current_link_number, &next_link)) {
write_end_of_link(out);
}
}
} }
#ifndef DUMP_COLOR_MODE_NONE #ifndef DUMP_COLOR_MODE_NONE