aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-04-03 15:03:42 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-03 15:47:23 +0300
commit51e8a79023758f4c424d861b0b1aa25578ed62d0 (patch)
tree695f61296e9eb2764bfa7a0a4bd3491a38bdea57
parent7de6f085afb5734c94dc33a4d10b900f51369715 (diff)
downloadpandoc-51e8a79023758f4c424d861b0b1aa25578ed62d0.tar.gz
Muse reader: refactor parseAnchor
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index bfde07eae..22f703e7d 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -778,9 +778,7 @@ parseAnchor :: PandocMonad m => MuseParser m String
parseAnchor = try $ do
getPosition >>= \pos -> guard (sourceColumn pos == 1)
char '#'
- first <- letter
- rest <- many (letter <|> digit)
- return $ first:rest
+ (:) <$> letter <*> many (letter <|> digit)
anchor :: PandocMonad m => MuseParser m (F Inlines)
anchor = try $ do