Move newline test out of context