diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-11-18 17:01:38 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-11-18 17:01:38 -0800 |
commit | a9a4e24d29542c16e0b31388a46e5bd808f35539 (patch) | |
tree | 7f2bfd16e26a325d1a520fdf438c3f6839b6f662 /src/Text/Pandoc | |
parent | e8e5ad210fa4bd49775822951e2b3352bec2c7e0 (diff) | |
download | pandoc-a9a4e24d29542c16e0b31388a46e5bd808f35539.tar.gz |
Added fields to track list levels.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Asciidoc.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Asciidoc.hs b/src/Text/Pandoc/Writers/Asciidoc.hs index f51c43362..45aa2cbee 100644 --- a/src/Text/Pandoc/Writers/Asciidoc.hs +++ b/src/Text/Pandoc/Writers/Asciidoc.hs @@ -46,13 +46,19 @@ import Data.List ( isPrefixOf, intercalate ) import Text.Pandoc.Pretty import Control.Monad.State -data WriterState = WriterState { defListMarker :: String } +data WriterState = WriterState { defListMarker :: String + , orderedListLevel :: Int + , bulletListLevel :: Int + } -- | Convert Pandoc to Asciidoc. writeAsciidoc :: WriterOptions -> Pandoc -> String writeAsciidoc opts document = evalState (pandocToAsciidoc opts document) WriterState{ - defListMarker = "::" } + defListMarker = "::" + , orderedListLevel = 1 + , bulletListLevel = 1 + } -- | Return markdown representation of document. pandocToAsciidoc :: WriterOptions -> Pandoc -> State WriterState String |