tadd a few HTML5 tags, update TODO, tiny cleanup - 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 74ca65d0beb13f86344479079cc3bfcc924c30ae
(DIR) parent 02ccf13986f580df16d65a35ceb8c334100d6ef6
(HTM) Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date: Sat, 21 Sep 2019 16:37:58 +0200
add a few HTML5 tags, update TODO, tiny cleanup
Diffstat:
M TODO | 9 +++++++--
M main.c | 6 +++++-
2 files changed, 12 insertions(+), 3 deletions(-)
---
(DIR) diff --git a/TODO b/TODO
t@@ -1,13 +1,18 @@
- base href.
specify and parse relative url, allow to specify base and also parse <base href="">
-- handle <link /> to RSS/Atom feed, show as link.
+- detect <link /> to RSS/Atom feed, show as link.
+ example: <link rel="alternate" href="atom.xml" type="application/atom+xml" title="Codemadness Atom Feed" />
+ or
+ <link rel="alternate" title="Tweakers Mixed RSS feed" type="application/rss+xml" href="https://tweakers.net/feeds/mixed.xml">
- handle whitespace, and tag types properly: atleast: inline-block, inline, block, pre
- print safe (not certain control chars, except newline, TAB etc).
- improve/remove duplicate white-space/newlines?
-- cleanup code.
- <code> should not be treated as a block (<pre> does?)
- add links as reference, for example on page: http://absmagazin.de/2018 the MP3 urls.
- add COMPATOBJ for strlcpy and strlcat.
- write a proper Makefile.
- write documentation and man pages.
+- cleanup code.
+? word-wrapping.
+? aligned/fancy table cell rendering.
? xml.c: make sure to always call xmldata handler even if datalen == 0 ?
(DIR) diff --git a/main.c b/main.c
t@@ -117,6 +117,11 @@ static struct {
{ "blockquote", DisplayBlock },
{ "hr", DisplayBlock },
{ "title", DisplayBlock },
+ { "nav", DisplayBlock },
+ { "main", DisplayBlock },
+ { "article", DisplayBlock },
+ { "header", DisplayBlock },
+ { "footer", DisplayBlock },
{ "div", DisplayBlock },
};
t@@ -509,7 +514,6 @@ xmltagend(XMLParser *p, const char *t, size_t tl, int isshort)
fputs("\n", stdout);
} else if (cur->displaytype & DisplayTableRow) {
fputs(" | ", stdout); /* HACK: assume last cell */
- } else if (cur->displaytype & DisplayTableCell) {
} else if (cur->displaytype & DisplayList) {
fputs("\n", stdout);
} else if (cur->displaytype & DisplayListItem) {