This repo is an example app to demonstrate how the maildown
gem does not render partials in plain text correctly.
It is in direct response to this Github Issue: zombocom/maildown#53
Steps to reproduce the issue:
-
Clone the repo and install gems via
bundle
. -
Run the server via
bundle exec rails s
-
Navigate to http://localhost:3000/rails/mailers/notifier_mailer/markdown_partial_test in your browser:
By default the HTML format will appear, and it appears correctly.
-
Click on the format drop down and select "View as plain-text email".
You will see that the partial gets rendered incorrectly as HTML instead of plain text.
-
To see what it should look like, navigate to http://localhost:3000/rails/mailers/notifier_mailer/non_markdown_partial_test.txt in your browser.
You will see that using two files for formats (
html.erb
andtext.erb
) and not using markdown (md.erb
) via maildown renders the partials correctly for both HTML and plain text.