The %Return% token

I think more, it is a bug in the file if you use more than one style of line endings, and all bets are off at that point.

As for BBEdit, it's a text editor, so it expects to edit text, which expects to have a single style of line endings in the file. After that, it is actually a sequence of lines in the window, with no particular line ending style, and with either \r or \n working as a line ending match. Trying to use BBEdit to deal with CRs in a LF line-ending file, or vice versa is never going to give consistent results - it is the sort of thing I would expect to change from version to version, it simply isn't well defined.

BBEdit is very good in that it will handle any style of line endings, but it is not so crazy as to try to handle multiple different styles at once.

Yes of course. What I’m referring to with the “bug” is the particular behavior of BBEdit when you open a mixed-linebreaks file with an LF as first line break.

In that case it fails to egalize the line breaks, while in general — if the first line break is not an LF — it does a very good job egalizing even the most weird mixes of line breaks.

I believe that's a feature, but you'd have to ask Rich Siegel to be certain.

-Chris

1 Like