aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/AsciiDoc.hs
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-03-01 23:36:54 +0400
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-01 20:36:54 +0100
commit39a8359b571ba0aa1e193b0ff9ef6252acc7a754 (patch)
treed222a0642b0dd379280a05b598101a53da816fba /src/Text/Pandoc/Writers/AsciiDoc.hs
parentea619bfcb4dd58f4ea0f3b02a61dc734180b79b2 (diff)
downloadpandoc-39a8359b571ba0aa1e193b0ff9ef6252acc7a754.tar.gz
Writers: Use gets to access MonadState where possible (#3480)
Diffstat (limited to 'src/Text/Pandoc/Writers/AsciiDoc.hs')
-rw-r--r--src/Text/Pandoc/Writers/AsciiDoc.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/AsciiDoc.hs b/src/Text/Pandoc/Writers/AsciiDoc.hs
index ab5cfc6d3..594a12222 100644
--- a/src/Text/Pandoc/Writers/AsciiDoc.hs
+++ b/src/Text/Pandoc/Writers/AsciiDoc.hs
@@ -286,7 +286,7 @@ bulletListItemToAsciiDoc opts blocks = do
return $ d <> cr <> chomp x
addBlock d b = do x <- blockToAsciiDoc opts b
return $ d <> cr <> text "+" <> cr <> chomp x
- lev <- bulletListLevel `fmap` get
+ lev <- gets bulletListLevel
modify $ \s -> s{ bulletListLevel = lev + 1 }
contents <- foldM addBlock empty blocks
modify $ \s -> s{ bulletListLevel = lev }
@@ -307,7 +307,7 @@ orderedListItemToAsciiDoc opts marker blocks = do
return $ d <> cr <> chomp x
addBlock d b = do x <- blockToAsciiDoc opts b
return $ d <> cr <> text "+" <> cr <> chomp x
- lev <- orderedListLevel `fmap` get
+ lev <- gets orderedListLevel
modify $ \s -> s{ orderedListLevel = lev + 1 }
contents <- foldM addBlock empty blocks
modify $ \s -> s{ orderedListLevel = lev }
@@ -320,7 +320,7 @@ definitionListItemToAsciiDoc :: PandocMonad m
-> ADW m Doc
definitionListItemToAsciiDoc opts (label, defs) = do
labelText <- inlineListToAsciiDoc opts label
- marker <- defListMarker `fmap` get
+ marker <- gets defListMarker
if marker == "::"
then modify (\st -> st{ defListMarker = ";;"})
else modify (\st -> st{ defListMarker = "::"})