Fix bug in MagicParser related to line endings