Losing Whitespace (Mac -> Windows)

This wasn’t a problem in the older version of scrivener, now that I’m getting back into this the files all render correctly on a mac, but have no spaces between sentences or paragraphs when opening text that was written on mac, but on the pc. Didn’t see anything similar anywhere else.

At first I thought this might be a git issue or mac using LF instead of CRLF. But the sentence thing has got me wondering. Since the text is no longer plain text files its not something I can just fix myself. To rule out git, I zipped up the file from mac (where it renders correctly) and unzipped it on windows. Anything written on the mac is broken. Anything written on windows is fine.

Help?

Nevermind it was git. For the next person who wants to deal with this:

If you’re going to use git with scrivener, make sure all the files are treated as binary. In your repo (or globally with the --global flag):

git config core.autocrlf false
git config core.whitespace ""
git config apply.whitespace nowarn

Then create a .gitattributes file in the root of your project with one line of text: * -text"

Combined this ensures all files are treated exactly the same as scrivener expects them to be regardless of which OS you’re on.

1 Like