Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rudimentary support for figure, figcaption #136

Merged
merged 1 commit into from
Aug 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
9 changes: 5 additions & 4 deletions html.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
4 changes: 4 additions & 0 deletions html.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions tagtable.tab
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down