aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-04-29 23:58:26 +0300
committerAlbert Krewinkel <albert+github@zeitkraut.de>2017-04-30 10:58:19 +0200
commit540f3d49efa35fc48585e8feb845a01c14e3020a (patch)
tree91d47a43259190050ebf53b1ca670dd8b7215ee3 /src
parent730796ee314d42477fab216621b8e44539c94656 (diff)
downloadpandoc-540f3d49efa35fc48585e8feb845a01c14e3020a.tar.gz
Org reader: Avoid creating nullMeta by applying setMeta directly
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Org/Meta.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Org/Meta.hs b/src/Text/Pandoc/Readers/Org/Meta.hs
index 69ca00b23..7938fc6c6 100644
--- a/src/Text/Pandoc/Readers/Org/Meta.hs
+++ b/src/Text/Pandoc/Readers/Org/Meta.hs
@@ -48,7 +48,6 @@ import Control.Monad (mzero, void)
import Data.Char (toLower)
import Data.List (intersperse)
import qualified Data.Map as M
-import Data.Monoid ((<>))
import Network.HTTP (urlEncode)
-- | Returns the current meta, respecting export options.
@@ -76,9 +75,7 @@ declarationLine :: PandocMonad m => OrgParser m ()
declarationLine = try $ do
key <- map toLower <$> metaKey
(key', value) <- metaValue key
- updateState $ \st ->
- let meta' = B.setMeta key' <$> value <*> pure nullMeta
- in st { orgStateMeta = meta' <> orgStateMeta st }
+ updateState $ \st -> st { orgStateMeta = B.setMeta key' <$> value <*> orgStateMeta st }
metaKey :: Monad m => OrgParser m String
metaKey = map toLower <$> many1 (noneOf ": \n\r")