mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-21 02:21:26 +08:00
Allow escaped linefeeds to break lines in $(())
This commit is contained in:
@@ -486,10 +486,13 @@ prop_a15= isOk readArithmeticContents "foo[`echo foo | sed s/foo/4/g` * 3] + 4"
|
|||||||
prop_a16= isOk readArithmeticContents "$foo$bar"
|
prop_a16= isOk readArithmeticContents "$foo$bar"
|
||||||
prop_a17= isOk readArithmeticContents "i<(0+(1+1))"
|
prop_a17= isOk readArithmeticContents "i<(0+(1+1))"
|
||||||
prop_a18= isOk readArithmeticContents "a?b:c"
|
prop_a18= isOk readArithmeticContents "a?b:c"
|
||||||
|
prop_a19= isOk readArithmeticContents "\\\n3 +\\\n 2"
|
||||||
readArithmeticContents =
|
readArithmeticContents =
|
||||||
readSequence
|
readSequence
|
||||||
where
|
where
|
||||||
spacing = many whitespace
|
spacing =
|
||||||
|
let lf = try (string "\\\n") >> return '\n'
|
||||||
|
in many (whitespace <|> lf)
|
||||||
|
|
||||||
splitBy x ops = chainl1 x (readBinary ops)
|
splitBy x ops = chainl1 x (readBinary ops)
|
||||||
readBinary ops = readComboOp ops TA_Binary
|
readBinary ops = readComboOp ops TA_Binary
|
||||||
|
Reference in New Issue
Block a user