提交 807d899f 编写于 作者: M Martin Schwenke

Fix incorrect detection of bash-style substring expansion

Substring expansion detection only considers ':' as a separator..  It
needs to avoid triggering for ":-", ":=", ":+" and ":?", since they
mean other things.

This is a regression introduced by commit
a90b6d14Signed-off-by: NMartin Schwenke <martin@meltin.net>
上级 d6803ffa
......@@ -623,7 +623,7 @@ getOffsetReferences mods = fromMaybe [] $ do
offsets <- match !!! 0
return $ matchAllStrings variableNameRegex offsets
where
re = mkRegex "^ *:(.*)"
re = mkRegex "^ *:([^-=?+].*)"
getReferencedVariables parents t =
case t of
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册