Skip to content

Commit

Permalink
Don't strip leading whitespace from whitespace-only node (Issue #528)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelrsweet committed Aug 28, 2024
1 parent 6351b55 commit 2d5b2ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion htmldoc/ps-pdf.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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 ++)
Expand Down

0 comments on commit 2d5b2ab

Please sign in to comment.