diff --git a/hmmlib2/hmmlib.h b/hmmlib2/hmmlib.h index 9594dae..cb1f09c 100644 --- a/hmmlib2/hmmlib.h +++ b/hmmlib2/hmmlib.h @@ -586,8 +586,9 @@ static size_t _hmml_parse_text(struct _hmml_parser* p, HMML_Annotation* anno) // it is a @ ~ or : marker without parameters else { - // if next char is a space, or prev char is not a space, then it can't be a marker - if(strchr(" \t\r\n", p->cursor[1]) || !strchr(" \t\r\n", p->cursor[-1])) { + // if next char is a space, or prev char is not a space*, then it can't be a marker + // * unless it's the first char + if(strchr(" \t\r\n", p->cursor[1]) || !(out == text_mem || strchr(" \t\r\n", p->cursor[-1]))) { *out++ = c; ++p->cursor; } else { @@ -796,7 +797,7 @@ void hmml_free(HMML_Output* out) } const struct HMML_Version hmml_version = { - 2, 0, 2 + 2, 0, 3 }; #undef HSTX