-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cross-platform collaboration breaks on monaco due to CRLF #41
Comments
@Blakeinstein Thanks for logging this issue and this has been a long overdue. We should be able to have a consistent way to handle different line endings natively from Firepad itself. But for the time being, you could do something like this in your monaco instance in your app:
and get it resolved. We do the same at Hackerrank. |
I should also do this when I update options and or language? |
Only if you update Monaco Model along with them. |
I assume all I need are the lines marked with |
I am assuming you know changes that you want to update as |
Ended up doing the following, and so far it looks like it works. editor.getModel().setEOL(monaco.editor.EndOfLineSequence.LF)
editor.getModel().applyEdits([
{
range: editor.getModel().getFullModelRange(),
text: editor.getModel().getLinesContent().join('\n')
}
]) You can close the issue, or keep it open as I see that you guys plan to provide a native solution for this. Thanks! |
Closing this for now. Let me know if any new problem comes up in this. |
Version info
Firebase: 8.9.1
Firepad: 0.2.0
Monaco: 0.20.0
Test case
Duplicate of FirebaseExtended#315
Steps to reproduce
Expected behavior
Consistent behaviour
Actual behavior
Cannot send changes from windows
The text was updated successfully, but these errors were encountered: