From fedf1f213fec089736fce041bb344f86a403c5cb Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Fri, 21 Sep 2018 02:57:06 +0300 Subject: Muse reader: simplify lchop --- src/Text/Pandoc/Readers/Muse.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs index a0069827a..a749b87b8 100644 --- a/src/Text/Pandoc/Readers/Muse.hs +++ b/src/Text/Pandoc/Readers/Muse.hs @@ -145,9 +145,8 @@ commonPrefix (x:xs) (y:ys) -- | Trim up to one newline from the beginning of the string. lchop :: String -> String -lchop s = case s of - '\n':ss -> ss - _ -> s +lchop ('\n':xs) = xs +lchop s = s -- | Trim up to one newline from the end of the string. rchop :: String -> String -- cgit v1.2.3