Skip to content

Added .preheader-spacing plaintext exclusion#912

Merged
sam-lord merged 1 commit into
mainfrom
fix-preheader-spacing-in-emails
May 12, 2026
Merged

Added .preheader-spacing plaintext exclusion#912
sam-lord merged 1 commit into
mainfrom
fix-preheader-spacing-in-emails

Conversation

@sam-lord
Copy link
Copy Markdown
Contributor

@sam-lord sam-lord commented May 12, 2026

ref ONC-1682

The spacing inserts a bunch of dodgy characters into the plaintext version of emails.

ref [ONC-1682](https://linear.app/ghost/issue/ONC-1682/plain-text-newsletter-encoding-artifacts-potential-deliverability)

The spacing inserts a bunch of dodgy characters into the plaintext
version of emails.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 12, 2026

Review Change Stack

Walkthrough

This PR modifies the HTML-to-plaintext conversion pipeline in the TryGhost SDK to skip an additional CSS selector during email generation. The emailSettings configuration in loadConverters() now excludes both .preheader and .preheader-spacing elements when converting HTML emails to plaintext format, preventing these preheader-related sections from appearing in the text output.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately and specifically describes the main change: adding .preheader-spacing to plaintext exclusions for email conversion.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The PR description relates to the changeset by explaining the problem (spacing causing encoding artifacts in plaintext emails) and the solution (adding .preheader-spacing exclusion), matching the code changes to skip this element.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-preheader-spacing-in-emails

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (defb53e) to head (03ead63).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #912   +/-   ##
=======================================
  Coverage   99.96%   99.96%           
=======================================
  Files          33       33           
  Lines        3072     3073    +1     
  Branches      477      477           
=======================================
+ Hits         3071     3072    +1     
  Misses          1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sam-lord sam-lord merged commit c8ed7b3 into main May 12, 2026
3 checks passed
@sam-lord sam-lord deleted the fix-preheader-spacing-in-emails branch May 12, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants