aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-06-23 23:04:42 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2016-06-23 23:04:42 -0700
commit69e59e7f293b6107b5b722f330ba8c4ffcf6bbe5 (patch)
treeebf7df8cf92a4fe2d2a74a9075e1dd5115b32f31 /src/Text
parent7f4ee830c985b94cafe594c8cdfe02cf418f95eb (diff)
downloadpandoc-69e59e7f293b6107b5b722f330ba8c4ffcf6bbe5.tar.gz
Process markdown extensions on command line in L->R order.
Previously they were processed, very unintuitively, in R->L order, so that `markdown-tex_math_dollars+tex_math_dollars` had `tex_math_dollars` disabled. Closes #2995.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs
index 0330c46e2..cd93e0b7b 100644
--- a/src/Text/Pandoc.hs
+++ b/src/Text/Pandoc.hs
@@ -191,7 +191,7 @@ parseFormatSpec = parse formatSpec ""
where formatSpec = do
name <- formatName
extMods <- many extMod
- return (name, foldl (.) id extMods)
+ return (name, \x -> foldl (flip ($)) x extMods)
formatName = many1 $ noneOf "-+"
extMod = do
polarity <- oneOf "-+"