mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
parse_table(): re-order code.
This commit is contained in:
parent
a00dfbecf9
commit
90d843e8fc
@ -692,8 +692,24 @@ see:
|
||||
/* Beyond that point, opening tags only. */
|
||||
if (closing_tag) goto see;
|
||||
|
||||
/* THEAD TBODY TFOOT */
|
||||
if (namelen == 5
|
||||
&& ((!strlcasecmp(&name[1], namelen - 1, "HEAD", 4)) ||
|
||||
(!strlcasecmp(&name[1], namelen - 1, "BODY", 4)) ||
|
||||
(!strlcasecmp(&name[1], namelen - 1, "FOOT", 4)))) {
|
||||
if (c_span) new_columns(table, c_span, c_width, c_al, c_val, 1);
|
||||
|
||||
add_table_bad_html_end(table, html);
|
||||
|
||||
group = 2;
|
||||
goto see;
|
||||
}
|
||||
|
||||
/* Beyond this point, only two letters tags. */
|
||||
if (namelen != 2) goto see;
|
||||
|
||||
/* TR */
|
||||
if (namelen == 2 && toupper(name[1]) == 'R') {
|
||||
if (toupper(name[1]) == 'R') {
|
||||
if (c_span) new_columns(table, c_span, c_width, c_al, c_val, 1);
|
||||
|
||||
if (in_cell) {
|
||||
@ -717,22 +733,7 @@ see:
|
||||
goto see;
|
||||
}
|
||||
|
||||
/* THEAD TBODY TFOOT */
|
||||
if (namelen == 5
|
||||
&& ((!strlcasecmp(&name[1], namelen - 1, "HEAD", 4)) ||
|
||||
(!strlcasecmp(&name[1], namelen - 1, "BODY", 4)) ||
|
||||
(!strlcasecmp(&name[1], namelen - 1, "FOOT", 4)))) {
|
||||
if (c_span) new_columns(table, c_span, c_width, c_al, c_val, 1);
|
||||
|
||||
add_table_bad_html_end(table, html);
|
||||
|
||||
group = 2;
|
||||
goto see;
|
||||
}
|
||||
|
||||
/* TD TH */
|
||||
if (namelen != 2) goto see;
|
||||
|
||||
if (toupper(name[1]) != 'D'
|
||||
&& toupper(name[1]) != 'H')
|
||||
goto see;
|
||||
|
Loading…
x
Reference in New Issue
Block a user