diff options
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | dpi/vsource.c | 5 |
2 files changed, 4 insertions, 2 deletions
@@ -15,6 +15,7 @@ dillo-3.2.0 [Not released yet] Add zoom support using Ctrl +/-/0 and the "zoom_factor" option. Fix wrong redirect by meta refresh without URL. Display JSON as plain text. + Add line number anchors in HTML source view. Patches: Rodrigo Arias Mallo dillo-3.1.1 [Jun 8, 2024] diff --git a/dpi/vsource.c b/dpi/vsource.c index 9d5694b5..3446be63 100644 --- a/dpi/vsource.c +++ b/dpi/vsource.c @@ -4,6 +4,7 @@ * This server is an example. Play with it and modify to your taste. * * Copyright 2010-2015 Jorge Arellano Cid <jcid@dillo.org> + * Copyright 2024 Rodrigo Arias Mallo <rodarima@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -134,8 +135,8 @@ void send_html_text(Dsh *sh, const char *url, int data_size) while (*p) { if (line > old_line) { snprintf(line_str, 128, - "<tr><td class='%s'>%d%s<td>", - (line & 1) ? "r1" : "r2", line, + "<tr><td class='%s' id='L%d'><a href='#L%d'>%d%s</a><td>", + (line & 1) ? "r1" : "r2", line, line, line, (line == 1 || (line % 10) == 0) ? " " : ""); a_Dpip_dsh_write_str(sh, 0, line_str); old_line = line; |