line ending detector