summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJasper Van der Jeugt <m@jaspervdj.be>2015-04-19 13:47:37 +0200
committerJasper Van der Jeugt <m@jaspervdj.be>2015-04-19 13:47:37 +0200
commite133e7b374f5f443d93e9f33aac23520249e0cde (patch)
tree89451ef03468ec80e806e01708e13ec2b13afc5d
parentd4d718da49d76de7b0de691e0687a209afe0881e (diff)
downloadstylish-haskell-e133e7b374f5f443d93e9f33aac23520249e0cde.tar.gz
Fix issue with shebang code0.5.13.0
-rw-r--r--CHANGELOG3
-rw-r--r--src/Language/Haskell/Stylish/Parse.hs2
-rw-r--r--stylish-haskell.cabal2
3 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 28a07c3..073d5c1 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,6 @@
+- 0.5.13.0
+ * Fix issue with shebang code
+
- 0.5.12.0
* Add support for shebang at start of file
diff --git a/src/Language/Haskell/Stylish/Parse.hs b/src/Language/Haskell/Stylish/Parse.hs
index a3ef579..f8e24a6 100644
--- a/src/Language/Haskell/Stylish/Parse.hs
+++ b/src/Language/Haskell/Stylish/Parse.hs
@@ -31,7 +31,7 @@ unCpp = unlines . go False . lines
-- | Remove shebang from the first line
unShebang :: String -> String
unShebang str
- | "#!" `isPrefixOf` str = unlines $ drop 1 $ lines str
+ | "#!" `isPrefixOf` str = unlines $ ("" :) $ drop 1 $ lines str
| otherwise = str
diff --git a/stylish-haskell.cabal b/stylish-haskell.cabal
index 1c11245..70fa70f 100644
--- a/stylish-haskell.cabal
+++ b/stylish-haskell.cabal
@@ -1,5 +1,5 @@
Name: stylish-haskell
-Version: 0.5.12.0
+Version: 0.5.13.0
Synopsis: Haskell code prettifier
Homepage: https://github.com/jaspervdj/stylish-haskell
License: BSD3