Issue Summary
-
Ghost.io generated emails sometimes have an extraordinary number of unnecessary newlines in the plain text part of the email (e.g. one newsletter I get has 28 new lines before the first text appears in the email).
-
This seems to be because the SDK
html-to-plaintextpackage by default has thepreserveNewlinessetting set to true. This means that any new-lines in the original html are preserved (not line breaks, but \n in the source html). -
This was raised by someone in a GitHub issue once: Plain text view · Issue #20015 · TryGhost/Ghost · GitHub
-
Image of plain text from email generated by ghost below:
Possible resolution:
- Instead of preserving all new lines from HTML, ghost should put in new lines based on HTML tags.
- I’ve created a patch here: Comparing TryGhost:main...exprez135:main · TryGhost/SDK · GitHub
- Would something like this be acceptable?
