CRLF line endings fix

Hi,
I recently had an issue converting markdown files explicitly saved in Windows Format CR+LF format. 
This tiny fix seems to have fixed that problem ;).

I additionally added some unit tests based on QUnit.