fixed nested <dl> - webdump - HTML to plain-text converter for webpages | |
git clone git://git.codemadness.org/webdump | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 29ab23324d260dae10475498bfcabd06a4c9ba48 | |
parent bc435d97f57537adbce2b1ddac9f0744a57279ae | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Wed, 13 Sep 2023 20:38:58 +0200 | |
fixed nested <dl> | |
Noticed on the page, for example: | |
http://man.openbsd.org/ftp | |
Diffstat: | |
M webdump.c | 6 +++--- | |
1 file changed, 3 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/webdump.c b/webdump.c | |
@@ -1856,12 +1856,12 @@ xmltagstart(XMLParser *p, const char *t, size_t tl) | |
} else if (!tagcmp(t, "dt")) { | |
childs[0] = "dd"; | |
nchilds = 1; | |
- parenttype = 0; /* seek until the root */ | |
+ parenttype = DisplayDl; | |
} else if (!tagcmp(t, "dd")) { | |
childs[0] = "dd"; | |
childs[1] = "dt"; | |
nchilds = 2; | |
- parenttype = 0; /* seek until the root */ | |
+ parenttype = DisplayDl; | |
} else if (!tagcmp(t, cur->tag.name)) { | |
/* fake closing the previous tag if it is the same and… | |
xmltagend(p, t, tl, 0); | |
@@ -1871,7 +1871,7 @@ xmltagstart(XMLParser *p, const char *t, size_t tl) | |
childs[0] = "p"; | |
childs[1] = "dl"; | |
nchilds = 2; | |
- parenttype = 0; /* seek until the root */ | |
+ parenttype = DisplayDl; | |
} | |
if (nchilds > 0) { |