git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: simplify isHorizontalRule
46cc1e7Alexander Krotov
src/Text/Pandoc/Writers/Muse.hs+1−3
@@ -396,9 +396,7 @@ urlEscapeBrackets (x:xs) = x:urlEscapeBrackets xs
396urlEscapeBrackets [] = []
396urlEscapeBrackets [] = []
397
397
398isHorizontalRule :: String -> Bool
398isHorizontalRule :: String -> Bool
399−isHorizontalRule s =
399+isHorizontalRule s = length s >= 4 && all (== '-') s
400− ((length xs) >= 4) && null ys
401− where (xs, ys) = span (== '-') s
402
400
403startsWithSpace :: String -> Bool
401startsWithSpace :: String -> Bool
404startsWithSpace (x:_) = isSpace x
402startsWithSpace (x:_) = isSpace x