# Add the ability to have both CRLF and LF

**URL:** <https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869>\
**Category:** v6\
**Created:** [August 19, 2026, 9:33pm UTC](https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869 "2026-08-19T21:33:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![paladox](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/paladox/32/3274_2.png) [@paladox](https://discuss.codemirror.net/u/paladox)\
**Post date:** [August 19, 2026, 9:33pm UTC](https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869/1 "2026-08-19T21:33:24Z")

</div>

You can have both CRLF and LF in a file. Could the ability for this be added to CM? The idea is that if someone uses git to upload a file to a code review. And said code review uses CodeMirror to allow editing the file through the file, those line endings wouldn’t show correctly because only one at a time is supported.

---

<div class="post-metadata">

**Author:** ![marijn](https://discuss.codemirror.net/user_avatar/discuss.codemirror.net/marijn/32/136_2.png) [@marijn](https://discuss.codemirror.net/u/marijn)\
**Post date:** [August 20, 2026, 6:03am UTC](https://discuss.codemirror.net/t/add-the-ability-to-have-both-crlf-and-lf/9869/2 "2026-08-20T06:03:17Z")

</div>

CodeMirror doesn’t store any information about line endings (beyond “there is a line ending here”). If you don’t configure a line separator, both CRLF and LF will be taken to be line endings, but you won’t get the precise original document back from the editor, because the distinction between the two will be lost. This isn’t something I’m going to change.
