help-browser: <mono> should be an inline tag

This commit is contained in:
K. Lange 2021-12-06 11:17:42 +09:00
parent 05a60ad8dc
commit d2874184f9
1 changed files with 3 additions and 9 deletions

View File

@ -144,16 +144,13 @@ static int parser_open(struct markup_state * self, void * user, struct markup_ta
} else if (!strcmp(tag->name, "h1")) {
list_insert(state, (void*)(uintptr_t)current_state);
current_state |= (1 << 2);
} else if (!strcmp(tag->name, "mono")) {
list_insert(state, (void*)(uintptr_t)current_state);
current_state |= (1 << 3);
} else if (!strcmp(tag->name, "br")) {
write_buffer();
cursor_x = BASE_X;
cursor_y += current_line_height();
} else if (!strcmp(tag->name, "mono")) {
write_buffer();
cursor_x = BASE_X;
cursor_y += current_line_height();
list_insert(state, (void*)(uintptr_t)current_state);
current_state |= (1 << 3);
}
markup_free_tag(tag);
return 0;
@ -169,9 +166,6 @@ static int parser_close(struct markup_state * self, void * user, char * tag_name
current_state = (int)(uintptr_t)nstate->value;
free(nstate);
} else if (!strcmp(tag_name, "mono")) {
write_buffer();
cursor_x = BASE_X;
cursor_y += current_line_height();
node_t * nstate = list_pop(state);
current_state = (int)(uintptr_t)nstate->value;
free(nstate);