diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index eeaaff9..1990c01 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -1696,11 +1696,19 @@ readLineBreak = optional readNewlineList prop_readSeparator1 = isWarning readScript "a &; b" prop_readSeparator2 = isOk readScript "a & b" +prop_readSeparator3 = isWarning readScript "a & b" +prop_readSeparator4 = isWarning readScript "a > file; b" readSeparatorOp = do notFollowedBy2 (void g_AND_IF <|> void readCaseSeparator) notFollowedBy2 (string "&>") f <- try (do + pos <- getPosition char '&' + optional $ do + s <- lookAhead . choice . map (try . string) $ + ["amp;", "gt;", "lt;"] + parseProblemAt pos ErrorC 1109 "This is an unquoted HTML entity. Replace with corresponding character." + spacing pos <- getPosition char ';'