summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-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