Muse reader: simplify lchop
commitfedf1f213fec089736fce041bb344f86a403c5cb
authorAlexander Krotov <ilabdsf@gmail.com>
dateFri 21 Sep 2018, 02:57 (8 years ago)
parent37c6f6a
src/Text/Pandoc/Readers/Muse.hs+2−3
@@ -145,9 +145,8 @@ commonPrefix (x:xs) (y:ys)
145145
146146-- | Trim up to one newline from the beginning of the string.
147147lchop :: String -> String
148−lchop s = case s of
149− '\n':ss -> ss
150− _ -> s
148+lchop ('\n':xs) = xs
149+lchop s = s
151150
152151-- | Trim up to one newline from the end of the string.
153152rchop :: String -> String