diff --git a/doctest.cabal b/doctest.cabal
--- a/doctest.cabal
+++ b/doctest.cabal
@@ -1,5 +1,5 @@
 name:             doctest
-version:          0.6.0.1
+version:          0.6.1
 synopsis:         Test interactive Haskell examples
 description:      The doctest program checks examples in source code comments.
                   It is modeled after doctest for Python
diff --git a/src/Parse.hs b/src/Parse.hs
--- a/src/Parse.hs
+++ b/src/Parse.hs
@@ -41,7 +41,7 @@
 
 -- | Extract all interactions from given Haddock documentation.
 parse :: String -> [Interaction]
-parse input = go (lines input)
+parse input = go (map (reverse . dropWhile ((==) '\r') . reverse) $ lines input)
   where
     isPrompt = isPrefixOf ">>>" . dropWhile isSpace
     isBlankLine  = null . dropWhile isSpace
