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.
This commit is contained in:
John MacFarlane 2016-06-23 23:04:42 -07:00
parent 7f4ee830c9
commit 69e59e7f29

View file

@ -191,7 +191,7 @@ parseFormatSpec = parse formatSpec ""
where formatSpec = do where formatSpec = do
name <- formatName name <- formatName
extMods <- many extMod extMods <- many extMod
return (name, foldl (.) id extMods) return (name, \x -> foldl (flip ($)) x extMods)
formatName = many1 $ noneOf "-+" formatName = many1 $ noneOf "-+"
extMod = do extMod = do
polarity <- oneOf "-+" polarity <- oneOf "-+"