1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-10-01 03:36:26 -04:00

Merge the special handling in start_element for tables into html_table.

This commit is contained in:
Miciah Dashiel Butler Masters 2005-11-26 02:38:12 +00:00 committed by Miciah Dashiel Butler Masters
parent 947ddc4160
commit d0eeab5b7e
2 changed files with 9 additions and 9 deletions

View File

@ -24,6 +24,7 @@
#include "document/html/parser/parse.h"
#include "document/html/parser.h"
#include "document/html/renderer.h"
#include "document/html/tables.h"
#include "document/options.h"
#include "intl/charsets.h"
#include "protocol/uri.h"
@ -592,6 +593,14 @@ void
html_table(struct html_context *html_context, unsigned char *attr,
unsigned char *html, unsigned char *eof, unsigned char **end)
{
if (html_context->options->tables
&& html_context->table_level < HTML_MAX_TABLE_LEVEL) {
format_table(attr, html, eof, end, html_context);
ln_break(html_context, 2);
return;
}
par_format.leftmargin = par_format.rightmargin = html_context->margin;
par_format.align = ALIGN_LEFT;
html_linebrk(html_context, attr, html, eof, end);

View File

@ -20,7 +20,6 @@
#include "document/html/parser/parse.h"
#include "document/html/parser/stack.h"
#include "document/html/parser.h"
#include "document/html/tables.h"
#include "document/options.h"
#include "intl/charsets.h"
#include "util/conv.h"
@ -782,14 +781,6 @@ start_element(struct element_info *ei,
restore_format = html_is_preformatted();
old_format = par_format;
if (ei->func == html_table && html_context->options->tables
&& html_context->table_level < HTML_MAX_TABLE_LEVEL) {
ELEMENT_RENDER_PROLOGUE
format_table(attr, html, eof, &html, html_context);
ln_break(html_context, 2);
return html;
}
/* Support for <meta refresh="..."> inside <body>. (bug 700) */
if (ei->func == html_meta && html_context->was_body) {
html_handle_body_meta(html_context, name - 1, eof);