Muse reader: parse Emacs Muse directives without parseFromString
Also require space (not newline) after directive name.
This commit is contained in:
parent
fc5d79b6e9
commit
9e21ae15e1
1 changed files with 2 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue