fix a syntax problem with a splace that provides a parameter to a function
This commit is contained in:
parent
504cce3ce3
commit
eda0ba7397
1 changed files with 7 additions and 4 deletions
|
@ -173,13 +173,16 @@ expandSplice s lls = concat [before, new:splicerest, end]
|
||||||
l:r -> (expandtabs l, take (length r) (repeat []))
|
l:r -> (expandtabs l, take (length r) (repeat []))
|
||||||
_ -> ([], [])
|
_ -> ([], [])
|
||||||
new = concat
|
new = concat
|
||||||
[ let s = deqqstart $ take (coordColumn cs - 1) splicestart
|
[ beforesplice
|
||||||
in if all isSpace s
|
|
||||||
then ""
|
|
||||||
else s
|
|
||||||
, addindent (findindent splicestart) (mangleCode $ splicedResult s)
|
, addindent (findindent splicestart) (mangleCode $ splicedResult s)
|
||||||
, deqqend $ drop (coordColumn ce) splicestart
|
, deqqend $ drop (coordColumn ce) splicestart
|
||||||
]
|
]
|
||||||
|
where
|
||||||
|
beforesplice =
|
||||||
|
let s = deqqstart $ take (coordColumn cs - 1) splicestart
|
||||||
|
in if all isSpace s
|
||||||
|
then ""
|
||||||
|
else s ++ " $ "
|
||||||
|
|
||||||
{- coordinates assume tabs are expanded to 8 spaces -}
|
{- coordinates assume tabs are expanded to 8 spaces -}
|
||||||
expandtabs = replace "\t" (take 8 $ repeat ' ')
|
expandtabs = replace "\t" (take 8 $ repeat ' ')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue