-
Notifications
You must be signed in to change notification settings - Fork 573
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’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add max line length option #203
Comments
@in4matik I knocked out a super-basic version of this functionality here. It's a bit kludgy though I have some ideas about how to improve it, but it should basically accomplish what you're after. I tested it against the source of this page with a |
@duncanbeevers Looks pretty good! I'm only concerned about performance implications. Could you run |
Wow. Seems great @duncanbeevers ! I haven't time to test it, but I will ! Thanks. |
@kangax Speed looks pretty stable, variance seems insignificant. |
Ok, let's get it in. Can you send a PR? Thanks. |
Sure. I was thinking of poking at this some more to get better-compressed results. For example, right now it maximally-compresses <a class="hey">link link</a> to this <a
class="hey">
link link
</a> I think the best we can hope for is this: <a
class
=
"hey"
>
link
link
</a
> But that's a fish to fry another day! |
I think this issue can be closed. If we want to pursue more aggressive splitting, I suggest we address that with another more-focused PR. |
For posterity, let me clarify a bit the issue regarding "some servers". The SMTP spec RFC 821, defined back in 1982 (source) says:
As far as raw email source vs. line length is concerned, there are other factors in play, such as encoding (which can vary), for example quoted-printable is often used and it will encode limiting line length to 76 and so on. But as far as this 1000 character limiter is concerned, I'm pretty sure it's coming from this RFC 821 spec interpretation. |
Hello,
I use html-minifier for emails, and some mail servers automatically add a new line after 1000 caracters. This behaviour breaks html structure.
For example :
``` `
g="10"The text was updated successfully, but these errors were encountered: