aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTatsuya Kinoshita <tats@debian.org>2020-08-23 10:07:22 +0000
committerGitHub <noreply@github.com>2020-08-23 10:07:22 +0000
commit59f873b7bf709f63b6f724f38614e699681de2e3 (patch)
treeb080e66c539a1171bf2b43b60ff66f16bc960d64
parentUpdate ChangeLog (diff)
parentRudimentary support for figure, figcaption (diff)
downloadw3m-59f873b7bf709f63b6f724f38614e699681de2e3.tar.gz
w3m-59f873b7bf709f63b6f724f38614e699681de2e3.zip
Merge pull request #136 from acli/20200821_figure
Rudimentary support for figure, figcaption
-rw-r--r--file.c4
-rw-r--r--html.c9
-rw-r--r--html.h4
-rw-r--r--tagtable.tab4
4 files changed, 17 insertions, 4 deletions
diff --git a/file.c b/file.c
index 0333e9a..c0fc044 100644
--- a/file.c
+++ b/file.c
@@ -4492,6 +4492,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
case HTML_N_Q:
HTMLlineproc1("'", h_env);
return 1;
+ case HTML_FIGURE:
+ case HTML_N_FIGURE:
case HTML_P:
case HTML_N_P:
CLOSE_A;
@@ -4506,6 +4508,8 @@ HTMLtagproc1(struct parsed_tag *tag, struct html_feed_environ *h_env)
obuf->flag |= RB_P;
}
return 1;
+ case HTML_FIGCAPTION:
+ case HTML_N_FIGCAPTION:
case HTML_BR:
flushline(h_env, obuf, envs[h_env->envc].indent, 1, h_env->limit);
h_env->blank_lines = 0;
diff --git a/html.c b/html.c
index d9f08e9..0c41332 100644
--- a/html.c
+++ b/html.c
@@ -268,10 +268,11 @@ TagInfo TagMAP[MAX_HTMLTAG] = {
{"small", ALST_NOP, MAXA_NOP, 0}, /* 139 HTML_SMALL */
{"/small", NULL, 0, TFLG_END}, /* 140 HTML_N_SMALL */
- {NULL, NULL, 0, 0}, /* 141 Undefined */
- {NULL, NULL, 0, 0}, /* 142 Undefined */
- {NULL, NULL, 0, 0}, /* 143 Undefined */
- {NULL, NULL, 0, 0}, /* 144 Undefined */
+ {"figure", ALST_P, MAXA_P, 0}, /* 141 HTML_FIGURE */
+ {"/figure", NULL, 0, 0}, /* 142 HTML_N_FIGURE */
+ {"figcaption", ALST_P, MAXA_P, 0}, /* 143 HTML_FIGCAPTION */
+ {"/figcaption", NULL, 0, TFLG_END}, /* 144 HTML_N_FIGCAPTION */
+
{NULL, NULL, 0, 0}, /* 145 Undefined */
{NULL, NULL, 0, 0}, /* 146 Undefined */
{NULL, NULL, 0, 0}, /* 147 Undefined */
diff --git a/html.h b/html.h
index 2a9a431..6da6f5f 100644
--- a/html.h
+++ b/html.h
@@ -231,6 +231,10 @@ typedef struct {
#define HTML_PARAM 138
#define HTML_SMALL 139
#define HTML_N_SMALL 140
+#define HTML_FIGURE 141
+#define HTML_N_FIGURE 142
+#define HTML_FIGCAPTION 143
+#define HTML_N_FIGCAPTION 144
/* pseudo tag */
#define HTML_SELECT_INT 160
diff --git a/tagtable.tab b/tagtable.tab
index f5a2c30..f731e09 100644
--- a/tagtable.tab
+++ b/tagtable.tab
@@ -192,6 +192,10 @@ optgroup HTML_OPTGROUP
param HTML_PARAM
small HTML_SMALL
/small HTML_N_SMALL
+figure HTML_FIGURE
+/figure HTML_N_FIGURE
+figcaption HTML_FIGCAPTION
+/figcaption HTML_N_FIGCAPTION
internal HTML_INTERNAL
/internal HTML_N_INTERNAL
select_int HTML_SELECT_INT