The sepBy eats the trailing escaped newline (I think) when trying to parse a command like this:
"fc \\n"
it "can parse something with a bare escaped newline" $ do
let s = cmd "cmd \\n "
-- let s = cmd "fc -lDt '%Y-%m-%d %H:%M:%S' 1"
let item = Item "cmd" [NotQuoted "\\n"]
parseHistory s `shouldBe` Right [item]
The
sepBy
eats the trailing escaped newline (I think) when trying to parse a command like this: