case STAR:
case UL:
closer = t->mate;
- if ((t->next->mate == closer->prev) &&
+ if (t->next &&
+ (t->next->mate == closer->prev) &&
(t->type == t->next->type) &&
(t->next->mate != t) &&
(t->start+t->len == t->next->start) &&
while (l) {
switch (l->type) {
case LINE_META:
+ meta:
if (m) {
meta_set_value(m, d->str);
d_string_erase(d, 0, -1);
l->len--;
}
case LINE_PLAIN:
+ plain:
d_string_append_c(d, '\n');
d_string_append_c_array(d, &source[l->start], l->len);
break;
+ case LINE_TABLE:
+ if (scan_meta_line(&source[l->start])) {
+ goto meta;
+ } else {
+ goto plain;
+ }
default:
fprintf(stderr, "ERROR!\n");
token_describe(l, NULL);