?
avatar infograf768
infograf768
25 Mar 2016

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.

avatar infograf768 infograf768 - open - 25 Mar 2016
avatar okonomiyaki3000
okonomiyaki3000 - comment - 25 Mar 2016

Does it make any difference whether you use FTP for writing to the file system or not?

avatar infograf768
infograf768 - comment - 25 Mar 2016

I do not use FTP in my tests. It is local only

avatar brianteeman brianteeman - change - 25 Mar 2016
Category External Library
avatar brianteeman
brianteeman - comment - 25 Mar 2016

Does it matter?


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9592.

avatar brianteeman
brianteeman - comment - 25 Mar 2016

If i searched correctly and understood then this is the relevant issue at codemirror codemirror/CodeMirror#3395


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9592.

avatar brianteeman brianteeman - change - 25 Mar 2016
Labels Added: ?
avatar infograf768
infograf768 - comment - 26 Mar 2016

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)

avatar Valc
Valc - comment - 26 Mar 2016

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.

avatar infograf768
infograf768 - comment - 27 Mar 2016

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.

avatar infograf768 infograf768 - change - 27 Mar 2016
Status New Closed
Closed_Date 0000-00-00 00:00:00 2016-03-27 07:04:12
Closed_By infograf768
avatar infograf768
infograf768 - comment - 27 Mar 2016

As this is not Codemirror specific and a PR ( #9616 ) is ready to test, closing this.


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/9592.

avatar infograf768 infograf768 - close - 27 Mar 2016

Add a Comment

Login with GitHub to post a comment