Introduction
Introduction Statistics Contact Development Disclaimer Help
fix leading white-space in <pre> - webdump - HTML to plain-text converter for w…
git clone git://git.codemadness.org/webdump
Log
Files
Refs
README
LICENSE
---
commit 4d0ab293b3f3ecd2e5a491c8e94678811f03e398
parent 1d80db038e35ca3778e2df19d00b9be512df185f
Author: Hiltjo Posthuma <[email protected]>
Date: Mon, 11 Sep 2023 18:58:55 +0200
fix leading white-space in <pre>
Skip first newline only.
Diffstat:
M webdump.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/webdump.c b/webdump.c
@@ -982,12 +982,12 @@ printpre(const char *s, size_t len)
hadnewline = 0;
currentnewlines = 0;
- /* skip leading white-space */
+ /* skip leading newline */
i = 0;
if (skipinitialws) {
- for (; *s && i < len; s++, i++) {
- if (!ISSPACE((unsigned char)*s))
- break;
+ if (*s == '\n' && i < len) {
+ *s++;
+ i++;
}
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.