Muse writer: simplify isHorizontalRule
commit46cc1e73b63c7046d7311cb4551bcc1794af41a8
authorAlexander Krotov <ilabdsf@gmail.com>
dateMon 16 Apr 2018, 15:36 (9 years ago)
parenta812298
src/Text/Pandoc/Writers/Muse.hs+1−3
@@ -396,9 +396,7 @@ urlEscapeBrackets (x:xs) = x:urlEscapeBrackets xs
396396urlEscapeBrackets [] = []
397397
398398isHorizontalRule :: String -> Bool
399−isHorizontalRule s =
400− ((length xs) >= 4) && null ys
401− where (xs, ys) = span (== '-') s
399+isHorizontalRule s = length s >= 4 && all (== '-') s
402400
403401startsWithSpace :: String -> Bool
404402startsWithSpace (x:_) = isSpace x