aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2020-08-30 00:59:02 +0000
committerGitHub <noreply@github.com>2020-08-30 00:59:02 +0000
commitf8b3efef9ca4399151e33897017ff3bf43afbe9e (patch)
treee7cecd5b5e1cadd8532cbe1b80e1e2fc80f15679
parentMerge pull request #146 from acli/20200821_a_CLEANED (diff)
parentwip from about a week ago. Need to stash these away for now to check the q br... (diff)
downloadw3m-f8b3efef9ca4399151e33897017ff3bf43afbe9e.tar.gz
w3m-f8b3efef9ca4399151e33897017ff3bf43afbe9e.zip
Merge pull request #147 from acli/20200825_section
Rudimentary support for the section tag
-rw-r--r--file.c1
-rw-r--r--html.c4
-rw-r--r--html.h2
-rw-r--r--tagtable.tab2
4 files changed, 7 insertions, 2 deletions
diff --git a/file.c b/file.c
index 34e445c..52ace23 100644
--- a/file.c
+++ b/file.c
@@ -4800,6 +4800,7 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
}
flushline(h_env, obuf, envs[h_env->envc].indent, 0, h_env->limit);
return 0;
+ case HTML_SECTION:
case HTML_HR:
close_anchor(h_env, obuf);
tmp = process_hr(tag, h_env->limit, envs[h_env->envc].indent);
diff --git a/html.c b/html.c
index 35a5787..7499191 100644
--- a/html.c
+++ b/html.c
@@ -272,9 +272,9 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"/figure", NULL, 0, TFLG_END}, /* 142 HTML_N_FIGURE */
{"figcaption", ALST_P, MAXA_P, 0}, /* 143 HTML_FIGCAPTION */
{"/figcaption", NULL, 0, TFLG_END}, /* 144 HTML_N_FIGCAPTION */
+ {"section", ALST_NOP, MAXA_NOP, 0}, /* 145 HTML_SECTION */
+ {"/section", NULL, 0, TFLG_END}, /* 146 HTML_N_SECTION */
- {NULL, NULL, 0, 0}, /* 145 Undefined */
- {NULL, NULL, 0, 0}, /* 146 Undefined */
{NULL, NULL, 0, 0}, /* 147 Undefined */
{NULL, NULL, 0, 0}, /* 148 Undefined */
{NULL, NULL, 0, 0}, /* 149 Undefined */
diff --git a/html.h b/html.h
index 7b173c3..38d03cd 100644
--- a/html.h
+++ b/html.h
@@ -235,6 +235,8 @@ typedef struct {
#define HTML_N_FIGURE 142
#define HTML_FIGCAPTION 143
#define HTML_N_FIGCAPTION 144
+#define HTML_SECTION 145
+#define HTML_N_SECTION 146
/* pseudo tag */
#define HTML_SELECT_INT 160
diff --git a/tagtable.tab b/tagtable.tab
index f731e09..cc94942 100644
--- a/tagtable.tab
+++ b/tagtable.tab
@@ -201,6 +201,8 @@ internal HTML_INTERNAL
select_int HTML_SELECT_INT
/select_int HTML_N_SELECT_INT
option_int HTML_OPTION_INT
+section HTML_SECTION
+/section HTML_N_SECTION
textarea_int HTML_TEXTAREA_INT
/textarea_int HTML_N_TEXTAREA_INT
pre_plain HTML_PRE_PLAIN