1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-12-04 14:46:47 -05:00

Remove assertion logic from parse_sgml_attributes()

They are getting out of hand and making it hard to use the function in
'unusual' situations (like when resuming parsing inside elements).
This commit is contained in:
Jonas Fonseca 2006-01-28 01:09:05 +01:00 committed by Jonas Fonseca
parent 1e104afbba
commit 9e7b0d4fa3

View File

@ -170,13 +170,6 @@ parse_sgml_attributes(struct dom_stack *stack, struct dom_scanner *scanner)
{
struct dom_scanner_token name;
assert(dom_scanner_has_tokens(scanner)
&& (get_dom_scanner_token(scanner)->type == SGML_TOKEN_ELEMENT_BEGIN
|| (get_dom_stack_top(stack)->node->type == DOM_NODE_PROCESSING_INSTRUCTION)));
if (get_dom_scanner_token(scanner)->type == SGML_TOKEN_ELEMENT_BEGIN)
skip_dom_scanner_token(scanner);
while (dom_scanner_has_tokens(scanner)) {
struct dom_scanner_token *token = get_dom_scanner_token(scanner);
@ -265,6 +258,8 @@ parse_sgml_plain(struct dom_stack *stack, struct dom_scanner *scanner)
if (token->type == SGML_TOKEN_ELEMENT_BEGIN) {
enum sgml_parser_code code;
skip_dom_scanner_token(scanner);
code = parse_sgml_attributes(stack, scanner);
if (code != SGML_PARSER_CODE_OK)
return code;