aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-01-19 11:29:11 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-01-19 11:29:11 +0300
commit9e21ae15e1d84f1a2c07bdd1961d9465557ecd63 (patch)
tree63930b347cf8067f25b5554b9517076ea4174baa /src/Text
parentfc5d79b6e9753a620b4e6754b8a5e1ea1163f119 (diff)
downloadpandoc-9e21ae15e1d84f1a2c07bdd1961d9465557ecd63.tar.gz
Muse reader: parse Emacs Muse directives without parseFromString
Also require space (not newline) after directive name.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 2d424ec81..65d97814d 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -156,10 +156,8 @@ parseDirectiveKey = do
parseEmacsDirective :: PandocMonad m => MuseParser m (String, F Inlines)
parseEmacsDirective = do
key <- parseDirectiveKey
- space
- spaces
- raw <- manyTill anyChar eol
- value <- parseFromString (trimInlinesF . mconcat <$> many inline) raw
+ spaceChar
+ value <- trimInlinesF . mconcat <$> manyTill (choice inlineList) eol
return (key, value)
parseAmuseDirective :: PandocMonad m => MuseParser m (String, F Inlines)