@@ -125,6 +125,37 @@ lxb_html_tree_insertion_mode_in_select_optgroup(lxb_html_tree_t *tree,
125125 return true;
126126}
127127
128+ lxb_inline bool
129+ lxb_html_tree_insertion_mode_in_select_hr (lxb_html_tree_t * tree ,
130+ lxb_html_token_t * token )
131+ {
132+ lxb_html_element_t * element ;
133+ lxb_dom_node_t * node = lxb_html_tree_current_node (tree );
134+
135+ if (lxb_html_tree_node_is (node , LXB_TAG_OPTION )) {
136+ lxb_html_tree_open_elements_pop (tree );
137+ }
138+
139+ node = lxb_html_tree_current_node (tree );
140+
141+ if (lxb_html_tree_node_is (node , LXB_TAG_OPTGROUP )) {
142+ lxb_html_tree_open_elements_pop (tree );
143+ }
144+
145+ element = lxb_html_tree_insert_html_element (tree , token );
146+ if (element == NULL ) {
147+ tree -> status = LXB_STATUS_ERROR_MEMORY_ALLOCATION ;
148+
149+ return lxb_html_tree_process_abort (tree );
150+ }
151+
152+ lxb_html_tree_open_elements_pop (tree );
153+
154+ lxb_html_tree_acknowledge_token_self_closing (tree , token );
155+
156+ return true;
157+ }
158+
128159lxb_inline bool
129160lxb_html_tree_insertion_mode_in_select_optgroup_closed (lxb_html_tree_t * tree ,
130161 lxb_html_token_t * token )
@@ -319,6 +350,9 @@ lxb_html_tree_insertion_mode_in_select(lxb_html_tree_t *tree,
319350 case LXB_TAG_OPTGROUP :
320351 return lxb_html_tree_insertion_mode_in_select_optgroup (tree , token );
321352
353+ case LXB_TAG_HR :
354+ return lxb_html_tree_insertion_mode_in_select_hr (tree , token );
355+
322356 case LXB_TAG_SELECT :
323357 return lxb_html_tree_insertion_mode_in_select_select (tree , token );
324358
0 commit comments