[commit: haddock] master: Fix bug with improper newline handling. (a7888ae)

git at git.haskell.org git at git.haskell.org
Wed Jul 8 08:40:44 UTC 2015


Repository : ssh://git@git.haskell.org/haddock

On branch  : master
Link       : http://git.haskell.org/haddock.git/commitdiff/a7888aefa4011d919b887ff31fcf8651af5632be

>---------------------------------------------------------------

commit a7888aefa4011d919b887ff31fcf8651af5632be
Author: Łukasz Hanuszczak <lukasz.hanuszczak at gmail.com>
Date:   Thu Jun 18 00:25:56 2015 +0200

    Fix bug with improper newline handling.


>---------------------------------------------------------------

a7888aefa4011d919b887ff31fcf8651af5632be
 haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
index 3ecfc7e..bfee4a7 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Parser.hs
@@ -59,7 +59,7 @@ spanToNewline [] = ([], [])
 spanToNewline ('\\':'\n':str) =
     let (str', rest) = spanToNewline str
     in ('\\':'\n':str', rest)
-spanToNewline ('\n':str) = ("\n", str)
+spanToNewline str@('\n':_) = ("", str)
 spanToNewline (c:str) =
     let (str', rest) = spanToNewline str
     in (c:str', rest)



More information about the ghc-commits mailing list