Preserve linebreaks

main
cel 5 years ago
parent 5ab99c55c8
commit 9e301ef3b3

@ -631,13 +631,10 @@ char_emphasis(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t of
}
/* char_linebreak • '\n' preceded by two spaces (assuming linebreak != 0) */
/* char_linebreak */
static size_t
char_linebreak(struct buf *ob, struct sd_markdown *rndr, uint8_t *data, size_t offset, size_t size)
{
if (offset < 2 || data[-1] != ' ' || data[-2] != ' ')
return 0;
/* removing the last space from ob and rendering */
while (ob->size && ob->data[ob->size - 1] == ' ')
ob->size--;

Loading…
Cancel
Save