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:
Matt Mascarenhas 2021-05-24 21:31:45 +01:00
parent d1440a7ac6
commit 9a31a1b10c
1 changed files with 3 additions and 3 deletions

View File

@ -299,7 +299,7 @@ static char* _hmml_read_attr(struct _hmml_parser* p, char* mem, size_t mem_size,
p->cursor = src+1;
} else {
const char* breaks = break_on_punct
? " ]\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;
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 });
if(extended) {
@ -813,7 +813,7 @@ void hmml_free(HMML_Output* out)
}
const struct HMML_Version hmml_version = {
2, 0, 7
2, 0, 8
};
#undef HSTX