hmmlib2 2.0.8: Align marker rules with hmmlib1
Make extended markers - those within [] - only break on whitespace Add '!' and '…' as break_on_punct chars
This commit is contained in:
parent
d1440a7ac6
commit
9a31a1b10c
|
@ -299,7 +299,7 @@ static char* _hmml_read_attr(struct _hmml_parser* p, char* mem, size_t mem_size,
|
||||||
p->cursor = src+1;
|
p->cursor = src+1;
|
||||||
} else {
|
} else {
|
||||||
const char* breaks = break_on_punct
|
const char* breaks = break_on_punct
|
||||||
? " ]\r\n\t:,'-.#=[\\?"
|
? " ]\r\n\t:,'-.#=[\\?!…"
|
||||||
: " ]\r\n\t"
|
: " ]\r\n\t"
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@ -376,7 +376,7 @@ static HMML_Marker _hmml_parse_marker(struct _hmml_parser* p)
|
||||||
|
|
||||||
++p->cursor;
|
++p->cursor;
|
||||||
|
|
||||||
char* end = _hmml_read_attr(p, marker_mem, sizeof(marker_mem), 1);
|
char* end = _hmml_read_attr(p, marker_mem, sizeof(marker_mem), !extended);
|
||||||
marker.marker = _hmml_persist_str(p, (struct _hmml_str){ marker_mem, end - marker_mem });
|
marker.marker = _hmml_persist_str(p, (struct _hmml_str){ marker_mem, end - marker_mem });
|
||||||
|
|
||||||
if(extended) {
|
if(extended) {
|
||||||
|
@ -813,7 +813,7 @@ void hmml_free(HMML_Output* out)
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct HMML_Version hmml_version = {
|
const struct HMML_Version hmml_version = {
|
||||||
2, 0, 7
|
2, 0, 8
|
||||||
};
|
};
|
||||||
|
|
||||||
#undef HSTX
|
#undef HSTX
|
||||||
|
|
Loading…
Reference in New Issue