try(styler:::parse_safely("a + 3 -4 -> x\r\n glück + 1"))
# This cannot be detected as a EOL style problem because the first
# line ends as expected with \n
try(styler:::parse_safely("a + 3 -4 -> x\nx + 2\r\n glück + 1"))
styler:::parse_safely("a + 3 -4 -> \n glück + 1")
Run the code above in your browser using DataLab