drupal_html_to_text() adds an excessive empty line to the end our marked-down diff.
While adding MAIL_LINE_ENDINGS ("\n") to every chunk is generally fine, we don't want another \n behind the last chunk.

As drupal_html_to_text() is used for other things as well, we'd might want to override it.
As an alternative, we can remove the excessive \n char later (as in my patch), which isn't exactly nice but a quick solution.

Comments

pancho’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB

Here's the patch.

alan d.’s picture

Sadly, new lines are content so these should only be stripped if they are being marked down :/

So a completely alternative approach, completely untested, hitting any content that has been marked down.

alan d.’s picture

Status: Needs review » Fixed

Added in a48164f. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Argus’s picture

Issue summary: View changes
Status: Closed (fixed) » Needs work

This was fixed a year ago. Why don't you release a new version of your module?

Argus’s picture

alan d.’s picture

Status: Needs work » Closed (fixed)

Please don't reopen fixed issues.

There is a separate issue for this already, #2184711: New Drupal 7 release (7.x-3.3) and there are not that many changes in the code base to really warrant a release, albeit a new release is overdue.

Argus’s picture

Thanks!