show "[IMG]" as a placeholder if alt text is empty - webdump - HTML to plain-te… | |
git clone git://git.codemadness.org/webdump | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 30a42a2ff270ef5e7ff96d8b23ed5ffbd58c665b | |
parent 5f17b244e6f5fd6d954cfe58679807fef3ea91e5 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Wed, 27 Sep 2023 18:53:02 +0200 | |
show "[IMG]" as a placeholder if alt text is empty | |
Depending on which options are set. | |
Diffstat: | |
M webdump.c | 4 ++++ | |
1 file changed, 4 insertions(+), 0 deletions(-) | |
--- | |
diff --git a/webdump.c b/webdump.c | |
@@ -1382,6 +1382,10 @@ handleinlinealt(void) | |
for (s = start; s < e; s++) | |
printc((unsigned char)*s); | |
hflush(); | |
+ } else if (cur->tag.id == TagImg && !showurlinline) { | |
+ /* if there is no alt text and no URL is shown inline, then | |
+ show "[IMG]" to indicate there was an image there */ | |
+ hprint("[IMG]"); | |
} | |
} | |