What style of linebreaks does codemirror use? Having troubles parsing CM text properly.

I have an existing forum post on sitepoint … not sure if cross linking is allowed but my issue is already explained here: https://www.sitepoint.com/community/t/how-can-i-properly-parse-a-string-sent-over-get-through-ajax-that-has-been-parsed-through-encodeuricomponent/223468

I have a feeling this might be a codemirror exclusive issue so I figured I should post here as well.