I'm guessing this is parser related.
Created attachment 269972 [details] example file
Created attachment 269973 [details] image what that file looks like in inspector
This is a bug relating to how we use CodeMirror.
<rdar://problem/24376799>
<rdar://problem/24376840>
Created attachment 270047 [details] patch
Comment on attachment 270047 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=270047&action=review > Source/WebInspectorUI/UserInterface/Views/CodeMirrorEditor.js:31 > + options.lineSeparator = "\n"; Why does this make CodeMirror leave the \r alone?
(In reply to comment #7) > Comment on attachment 270047 [details] > patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=270047&action=review > > > Source/WebInspectorUI/UserInterface/Views/CodeMirrorEditor.js:31 > > + options.lineSeparator = "\n"; > > Why does this make CodeMirror leave the \r alone? It will trust us and use "\n" as the newline terminator instead of its own default thing that takes into account "\r"
Comment on attachment 270047 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=270047&action=review >> Source/WebInspectorUI/UserInterface/Views/CodeMirrorEditor.js:31 >> + options.lineSeparator = "\n"; > > Why does this make CodeMirror leave the \r alone? I suspect the \r will be there in the editor on the end of the lines, but will be invisible.
Does CodeMirror render the \r? From the code it looks like it might: var txt = content.appendChild(elt("span", m[0] == "\r" ? "␍" : "", "cm-invalidchar")); txt.setAttribute("cm-text", m[0]); builder.col += 1;
(In reply to comment #10) > Does CodeMirror render the \r? From the code it looks like it might: > > var txt = content.appendChild(elt("span", m[0] == "\r" ? "␍" : "", > "cm-invalidchar")); > txt.setAttribute("cm-text", m[0]); > builder.col += 1; It does.
Comment on attachment 270047 [details] patch Clearing flags on attachment: 270047 Committed r195723: <http://trac.webkit.org/changeset/195723>
All reviewed patches have been landed. Closing bug.