markor
markor copied to clipboard
Determine and keep EOL (for saving/reading files) (\n vs \r\n)
From @jeromg https://github.com/gsantner/gitalk-gsantner-net/issues/36
Hi there,
I'm syncing files (using syncthing) between a windows machine and an android phone. I really love the app, the only glitch I have right now is related to the end-of-line chars :
When I edit a file on the phone, it's synced to my laptop but end-of-line chars become CR only and not CR-LF as windows expects. Is there a way to change this (couldn't find a way)?
Thanks again for the great app! Keep up the good job.
Cheers /jerome
I would like to force Markor to create windows compatible line end for new created files.
When I create new files in Markor I have issues in some other Android editors like epsilon editor not detecting new files.
My files are synced with Windows and it looks like Windows is able to not keep the original line end markers and can apply Windows style. After synchronize back I can use these files also in other editors.
It would be easier for me if I could force Markor to use always Windows style for new created files.
Just as a note here:
Lots of autoformat, auto renumber etc code currently relies on newline == \n. Not sure how windows and mac line endings will affect this.
My suggestion: Determine \r\n # \r # \n, replace everything with \n at markor usage, and at file save time use the original one again.
This way no additional custom handling for anything required at Markor.