Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Beautify HTML output to prevent >990 char lines #137

Merged
merged 1 commit into from May 20, 2017

Conversation

Alamantus
Copy link
Contributor

Prevent long lines from being broken in Yahoo and Gmail clients.

I made this change before the 2.x update, but it's still a problem, so here it is again. 馃槃

Prevent long lines from being broken in Yahoo and Gmail clients.
@meriadec meriadec merged commit aee0018 into mjmlio:master May 20, 2017
@meriadec
Copy link
Contributor

Thanks @Alamantus 馃槃

@meriadec
Copy link
Contributor

Just realized that the PR was for master branch, so I removed commit & pushed it to develop branch (I need to document that in README, but I prefer keep master sync with releases, and do all development on develop).

Also, I added js-beautify to app dependencies :)

@meriadec
Copy link
Contributor

@ngarnier in your opinion, will it conflict with minify output option ? Should we disable beautify when minify is enabled? Or maybe should we make beautify optional? (Like it is now, the MJML App output will not be the "real" MJML output anymore.

@ngarnier
Copy link
Member

ngarnier commented May 23, 2017

hey @meriadec, I guess the question is: should we add this beautify option in MJML instead of the app?

@Alamantus, have you seen the HTML output of MJML break because of the way it is formatted? I have never seen that, so it would be very useful if you could share a MJML template where this happens so I can reproduce.

Thanks!

@Alamantus
Copy link
Contributor Author

@ngarnier It has happened to some of the marketing emails at work, but it was a while ago so I'd have to see if I can find them. In Gmail and Yahoo mail, the client was inserting a line break at about column 990 for some reason. I know it was those clients because the same HTML source came through in Outlook without the line breaks.

It's weird that you haven't encountered it before, though. We use an old version of ARPReach to distribute the emails rather than Mailjet, so maybe it's something happening in the send process, but that doesn't explain why it doesn't contain those line breaks in Outlook (where everything else usually does break).

meriadec added a commit that referenced this pull request May 26, 2017
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.

None yet

3 participants