From 6d0bfcf37a7ebfc98d215f289b4dae3442383574 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 27 Oct 2013 16:02:27 -0700 Subject: [PATCH] Fixed parser accepting spaces after here doc token --- ShellCheck/Parser.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index 2730901..234e49c 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -1014,7 +1014,11 @@ readHereDoc = called "here document" $ do spacing startPos <- getPosition - hereData <- anyChar `reluctantlyTill` (linefeed >> spacing >> (string endToken) >> (disregard whitespace <|> eof)) + hereData <- anyChar `reluctantlyTill` do + linefeed + spacing + string endToken + disregard linefeed <|> eof do linefeed