@@ -41,7 +41,7 @@ DokuWiki: <https://www.dokuwiki.org/dokuwiki>
4141module Text.Pandoc.Writers.DokuWiki ( writeDokuWiki ) where
4242import Control.Monad (zipWithM)
4343import Control.Monad.Reader (ReaderT, ask, local, runReaderT)
44−import Control.Monad.State.Strict (StateT, evalStateT, gets, modify)
44+import Control.Monad.State.Strict (StateT, evalStateT)
4545import Data.Default (Default (..))
4646import Data.List (intercalate, intersect, isPrefixOf, transpose)
4747import Data.Text (Text, pack)
@@ -56,7 +56,6 @@ import Text.Pandoc.Templates (renderTemplate')
5656import Text.Pandoc.Writers.Shared (defField, metaToJSON)
5757
5858data WriterState = WriterState {
59− stNotes :: Bool -- True if there are notes
6059 }
6160
6261data WriterEnvironment = WriterEnvironment {
@@ -66,7 +65,7 @@ data WriterEnvironment = WriterEnvironment {
6665 }
6766
6867instance Default WriterState where
69− def = WriterState { stNotes = False }
68+ def = WriterState {}
7069
7170instance Default WriterEnvironment where
7271 def = WriterEnvironment { stIndent = ""
@@ -92,7 +91,6 @@ pandocToDokuWiki opts (Pandoc meta blocks) = do
9291 (inlineListToDokuWiki opts)
9392 meta
9493 body <- blockListToDokuWiki opts blocks
95− notesExist <- gets stNotes
9694 let main = pack body
9795 let context = defField "body" main
9896 $ defField "toc" (writerTableOfContents opts) metadata
@@ -514,7 +512,6 @@ inlineToDokuWiki opts (Image attr alt (source, tit)) = do
514512
515513inlineToDokuWiki opts (Note contents) = do
516514 contents' <- blockListToDokuWiki opts contents
517− modify (\s -> s { stNotes = True })
518515 return $ "((" ++ contents' ++ "))"
519516 -- note - may not work for notes with multiple blocks
520517