I got bitten by messy files recently and I have the impression that you
should have
in and out line ending settings (because may be you want to see Ston one
way and output the other)
And for the image I'm afraid by the amount of code it will break but it
would be really good.
May be migrating to Xtreams first should be the path.
Stef
Le 19/8/16 à 14:55, Sven Van Caekenberghe a écrit :
Yes it would make much more sense to default to LF EOL (maybe not on Windows)
in this century, but that is true for the whole image ...
On 19 Aug 2016, at 14:49, Peter Uhnak <[email protected]> wrote:
Hi,
can we have a class-side configuration for STON line ending?
Atm if I want to output with LF instead of CR (which is always),
then I have to always do this
String streamContents: [ :stream |
(STON writer on: stream)
prettyPrint: true;
newLine: String lf;
nextPut: data
].
I would be much happier if at least I could do this
STON lineEnding: String lf
(I could put the above in a StartupScript)
And then just use regular STON toStringPretty: data.
And I would be even happier if
STON class>>lineEnding
^ String lf
or
STON class>>lineEnding
^ OSPlatform current isWindows
ifTrue: [ String crlf ]
ifFalse: [ String lf ]
(Although always using LF by default might be preferable.)
To summarize, it would be great if we could:
* switch STON to LF _by default_
* allow users to easily switch to CR/CRLF if they need
Thanks,
Peter