tsimplify a bit, add <label> inline and <div> as block for now - webdump - [FORK] git://git.codemadness.org/webdump
(HTM) git clone git://git.z3bra.org/webdump.git
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit d43a011c4cd01f75ec9169ce745d6d1e13958729
(DIR) parent ac91a742d386618a025609433e3e43b303272b3e
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Fri, 25 Aug 2017 00:29:06 +0200
simplify a bit, add <label> inline and <div> as block for now
Diffstat:
M main.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
---
(DIR) diff --git a/main.c b/main.c
t@@ -62,6 +62,7 @@ static char *inlinetags[] = {
"img",
"td",
"th",
+ "label",
};
static char *blocktags[] = {
t@@ -82,6 +83,7 @@ static char *blocktags[] = {
"table",
"code",
"blockquote",
+ "div",
};
static String htmldata;
t@@ -314,18 +316,17 @@ startignore:
return;
if ((c = p->getnext()) != '/')
goto startignore;
- i = 0;
- while ((c = p->getnext()) != EOF) {
+ for (i = 0; (c = p->getnext()) != EOF; i++) {
if (c == '>')
break;
if (i + 1 >= sizeof(tmp))
goto startignore;
- tmp[i++] = c;
+ tmp[i] = c;
}
tmp[i] = '\0';
/* compare against current ignored tag */
- if (!strcasecmp(cur->tag, tmp))
+ if (!strcasecmp(tag, tmp))
cur->isignore = 0;
return;
}