Go to administrator=>Templates=>Beez=>Edit template
/administrator/index.php?option=com_templates&view=template&id=503
Edit a php file, for example: component.php
Save and close.
Now Manually open the file on the desktop with a TextEditor (I use BBEdit on Macintosh).
The file has now Windows EOL (CRLF) instead of Unix ending.
I do not use FTP in my tests. It is local only
Category | ⇒ | External Library |
Does it matter?
If i searched correctly and understood then this is the relevant issue at codemirror codemirror/CodeMirror#3395
Labels |
Added:
?
|
Not sure, @brianteeman
I understand it rather as a discussion about forcing the use of the same line ending of the precedent line when creating a new one.
@okonomiyaki3000
I may have found a way to solve the issue in com_localise and waiting for @Valc to test.
See joomla-projects/com_localise#297 (comment)
I think than the applied patch after codemirror/CodeMirror#3395 issue allow mix EOLs, but seems that also allow set the EOL by default, such i can read from the manual:
lineSeparator: string|null
Explicitly set the line separator for the editor. By default (value null), the document will be split on CRLFs as well as lone CRs and LFs, and a single LF will be used as line separator in all output (such as getValue). When a specific string is given, lines will only be split on that string, and output will, by default, use that same separator.
At line 5317 of ./media/editors/codemirror/lib/codemirror.js we have:
option("lineSeparator", null, function(cm, val) {
And seems that can to be forced to use "\n" changing to:
option("lineSeparator", "\n", function(cm, val) {
But not luck when i try to change the "null" by "\n": it continues saving in windows format. I think than i don't know how to set correctly that one and maybe you can take a look there.
The stuff is that if before this patch:
codemirror/CodeMirror@04ea39c
codemirror/CodeMirror@0d9dbab
If we was saving files with UNIX format and no way by "option" to force the desired EOL, for me the normal stuff is comeback to previous files, due open files with UNIX/Linux EOL and obtain files with Windows EOL does not seems a good idea.
Regards.
Folks, I just tested with Editor None and I have the same issue.
Will now provide a PR implementing the same solution I used for com_localise.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-03-27 07:04:12 |
Closed_By | ⇒ | infograf768 |
As this is not Codemirror specific and a PR ( #9616 ) is ready to test, closing this.
Does it make any difference whether you use FTP for writing to the file system or not?