From 1b207b3d4373b082fb4af7893421df019a1f28f3 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 26 Nov 2018 20:43:15 -0800 Subject: [PATCH] Preemptively fix possible '-- |' breakage --- src/ShellCheck/Parser.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Parser.hs b/src/ShellCheck/Parser.hs index d656ed9..3330979 100644 --- a/src/ShellCheck/Parser.hs +++ b/src/ShellCheck/Parser.hs @@ -1916,8 +1916,9 @@ readNewlineList = where checkBadBreak = optional $ do pos <- getPosition - try $ lookAhead (oneOf "|&") -- |, || or && - parseProblemAt pos ErrorC 1133 "Unexpected start of line. If breaking lines, |/||/&& should be at the end of the previous one." + try $ lookAhead (oneOf "|&") -- See if the next thing could be |, || or && + parseProblemAt pos ErrorC 1133 + "Unexpected start of line. If breaking lines, |/||/&& should be at the end of the previous one." readLineBreak = optional readNewlineList prop_readSeparator1 = isWarning readScript "a &; b"