diff --git a/c/tex_parser/tex_table.c b/c/tex_parser/tex_table.c index 74d0007..d74d613 100644 --- a/c/tex_parser/tex_table.c +++ b/c/tex_parser/tex_table.c @@ -76,6 +76,8 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str } else if (c == '%') { where_stack[++tex_level] = IN_COMMENT; + } else if (isgraph(c) || c < 0) { + } else { error->code = (int)i; error->message = "unexpected symbol (IN_UDEF)"; @@ -94,7 +96,8 @@ int parse_table(const char *table_source, size_t len, struct table_s *table, str if (isalnum(c)) { tag = zalloc_append8_str(tag, c); - } else if (!tag && (c == '\\' || c == ',' || c == '%')) { + } else if (!tag && (c == '\\' || c == ',' + || c == '%' || c == '_')) { where_stack[tex_level--] = IN_UNDEF; } else if (!tag) {