Closed Bug 757071 Opened 13 years ago Closed 11 years ago

Style editor doesn't honour existing line ending type on newly added lines

Categories

(DevTools :: Source Editor, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: emorley, Unassigned)

References

Details

(Whiteboard: [sourceeditor])

Attachments

(1 file)

Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/15.0 Firefox/15.0a1

1) Visit a site that has a stylesheet with unix file endings. eg https://tbpl.mozilla.org/
2) Open the Style Editor
3) Add a newline
4) Use save
5) Open resultant .css file in text editor of choice + show file endings.

Expected:
Added newline is LF, matching the rest of the file.

Actual:
Added newline is a CRLF.
Whiteboard: [sourceeditor][orion]
There's an upstream Orion bug about this issue already reported:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=349096

I will ping the Orion team about this problem to see if we can get a fix soon. Thanks for your report Ed!
OS: Windows 7 → All
Hardware: x86 → All
Thank you :-)
Problem identified. Will look into implementing a fix, in time for bug 759351.
Assignee: nobody → mihai.sucan
Status: NEW → ASSIGNED
Depends on: 759351
Whiteboard: [sourceeditor][orion] → [sourceeditor]
Moving to Source Editor component.

Filter on CHELICERAE.
Component: Developer Tools: Style Editor → Developer Tools: Source Editor
Attached patch proposed patch (deleted) — Splinter Review
Easy fix. We need to use a nice feature of the Orion TextModel: autodetect line endings.
Attachment #645442 - Flags: review?(rcampbell)
Depends on: 746218
No longer depends on: 759351
Blocks: 760825
Comment on attachment 645442 [details] [diff] [review]
proposed patch

alrighty.
Attachment #645442 - Flags: review?(rcampbell) → review+
I think bug 919978 fixed this. At least od -c file.css doesn't show anything weird:

0041760    t   r   e   e   -   s   t   a   t   u   s       .   a   p   p
0042000    r   o   v   a   l   R   e   q   u   i   r   e   d       {  \n
0042020            c   o   l   o   r   :       o   r   a   n   g   e   ;
0042040   \n   }  \n  \n   a   s   d  \n                                
0042050
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Assignee: mihai.sucan → nobody
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: