mirror of
https://github.com/rkd77/elinks.git
synced 2025-02-02 15:09:23 -05:00
Save the end tag token in the SGML parser state
... so that the renderer eventually can pick it up and highlight it.
This commit is contained in:
parent
7a912795e1
commit
d7d5fcab4d
@ -247,6 +247,18 @@ parse_sgml_document(struct dom_stack *stack, struct scanner *scanner)
|
||||
if (!token->length) {
|
||||
pop_dom_node(stack);
|
||||
} else {
|
||||
struct dom_stack_state *state;
|
||||
|
||||
state = search_dom_stack(stack, DOM_NODE_ELEMENT,
|
||||
token->string, token->length);
|
||||
if (state) {
|
||||
struct sgml_parser_state *pstate;
|
||||
|
||||
pstate = get_dom_stack_state_data(stack, state);
|
||||
|
||||
copy_struct(&pstate->end_token, token);
|
||||
}
|
||||
|
||||
pop_dom_nodes(stack, DOM_NODE_ELEMENT,
|
||||
token->string, token->length);
|
||||
}
|
||||
|
@ -38,6 +38,9 @@ struct sgml_parser {
|
||||
|
||||
struct sgml_parser_state {
|
||||
struct sgml_node_info *info;
|
||||
/* This is used by the DOM source renderer for highlighting the
|
||||
* end-tag of an element. */
|
||||
struct scanner_token end_token;
|
||||
};
|
||||
|
||||
struct sgml_parser *
|
||||
|
Loading…
x
Reference in New Issue
Block a user