You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WAMultiPartEmailMessageTest>>#testFromToSubjectBody and
WAMultiPartEmailMessageTest>>#testHeaders both send #withSqueakLineEndings.
String>>#withSqueakLineEndings is both non-portable and non-intention-revealing
(at least in the context of Seaside).
I would propose adding String>>#withHtmlLineEndings. The method name
immediately identifies it's purpose. A portable implementation could be added
to Grease-Core:
withHtmlLineEndings
(self includes: Character lf) ifFalse: [ ^ self ]. "No Lf's ; nothing to do"
(self includes: Character cr) ifFalse: [ ^ self copyReplacingAll: (String with: Character lf) with: (String with: Character cr) ]. "Only Lf's; change them to Cr's"
^ (self copyReplaceAll: (String with: Character cr with: Character lf) with: (String with: Character cr)) copyReplaceAll: (String with: Character lf) with: (String with: Character cr)
or a platform-specific implementation could be added to Grease-Pharo-Core:
withHtmlLineEndings
^ self withSqueakLineEndings
I would prefer the platform-specific implementation because a) it is simpler
and b) String>>#withHtmlLineEndings is useful outside the realm of Seaside (at
least in VA Smalltalk).
Original issue reported on code.google.com by wemb...@instantiations.com on 9 Jul 2014 at 11:23
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
wemb...@instantiations.com
on 9 Jul 2014 at 11:23The text was updated successfully, but these errors were encountered: