diff --git a/CHANGES.md b/CHANGES.md index 5e8db3c7..9da53701 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,7 @@ management and fix potential double-free bugs. - Updated configure script to look for zlib with pkg-config (Issue #519) - Updated markdown support code to mmd. +- Fixed handling of whitespace-only nodes (Issue #528) # Changes in HTMLDOC v1.9.18 diff --git a/htmldoc/ps-pdf.cxx b/htmldoc/ps-pdf.cxx index b6ae8035..9ad44ebb 100644 --- a/htmldoc/ps-pdf.cxx +++ b/htmldoc/ps-pdf.cxx @@ -5201,7 +5201,7 @@ parse_paragraph(tree_t *t, /* I - Tree to parse */ if (temp->markup != MARKUP_A) break; - if (temp != NULL && temp->markup == MARKUP_NONE && temp->data[0] == ' ') + if (temp != NULL && temp->markup == MARKUP_NONE && temp->data[0] == ' ' && temp->data[1]) { // Drop leading space... for (dataptr = temp->data; *dataptr; dataptr ++)