aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-04-16 15:36:30 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-16 15:36:30 +0300
commit46cc1e73b63c7046d7311cb4551bcc1794af41a8 (patch)
tree249d773eeb5c56a0e41d67d42eddc4a7868914b4 /src/Text/Pandoc
parenta8122987fc3301bc6c0b799312cc2f676bec8042 (diff)
downloadpandoc-46cc1e73b63c7046d7311cb4551bcc1794af41a8.tar.gz
Muse writer: simplify isHorizontalRule
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Writers/Muse.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs
index d1e407026..17ca727c1 100644
--- a/src/Text/Pandoc/Writers/Muse.hs
+++ b/src/Text/Pandoc/Writers/Muse.hs
@@ -396,9 +396,7 @@ urlEscapeBrackets (x:xs) = x:urlEscapeBrackets xs
urlEscapeBrackets [] = []
isHorizontalRule :: String -> Bool
-isHorizontalRule s =
- ((length xs) >= 4) && null ys
- where (xs, ys) = span (== '-') s
+isHorizontalRule s = length s >= 4 && all (== '-') s
startsWithSpace :: String -> Bool
startsWithSpace (x:_) = isSpace x