diff options
author | John MacFarlane <jgm@berkeley.edu> | 2012-07-25 22:35:41 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2012-07-25 22:35:41 -0700 |
commit | acde1e82d2f070ceab8d0fd01ad3677c6c9e078c (patch) | |
tree | cc067dff2c2d81d4d30afbcd513e39c5cb2951dd /src/Text/Pandoc/Readers/Textile.hs | |
parent | 9b5d2031c7d643de3397da2e4f38b2f6b45feb64 (diff) | |
download | pandoc-acde1e82d2f070ceab8d0fd01ad3677c6c9e078c.tar.gz |
Changed reader parameters from ParserState to ReaderOptions.
Diffstat (limited to 'src/Text/Pandoc/Readers/Textile.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Textile.hs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Text/Pandoc/Readers/Textile.hs b/src/Text/Pandoc/Readers/Textile.hs index e4537f33d..65aa144c2 100644 --- a/src/Text/Pandoc/Readers/Textile.hs +++ b/src/Text/Pandoc/Readers/Textile.hs @@ -56,7 +56,7 @@ TODO : refactor common patterns across readers : module Text.Pandoc.Readers.Textile ( readTextile) where import Text.Pandoc.Definition -import Text.Pandoc.Shared +import Text.Pandoc.Shared import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Readers.HTML ( htmlTag, isInlineTag, isBlockTag ) @@ -67,11 +67,11 @@ import Control.Monad ( guard, liftM ) import Control.Applicative ((<$>), (*>), (<*)) -- | Parse a Textile text and return a Pandoc document. -readTextile :: ParserState -- ^ Parser state, including options for parser - -> String -- ^ String to parse (assuming @'\n'@ line endings) - -> Pandoc -readTextile state s = - (readWith parseTextile) state (s ++ "\n\n") +readTextile :: ReaderOptions -- ^ Reader options + -> String -- ^ String to parse (assuming @'\n'@ line endings) + -> Pandoc +readTextile opts s = + (readWith parseTextile) def{ stateOptions = opts } (s ++ "\n\n") -- | Generate a Pandoc ADT from a textile document @@ -243,8 +243,8 @@ definitionListItem :: Parser [Char] ParserState ([Inline], [[Block]]) definitionListItem = try $ do string "- " term <- many1Till inline (try (whitespace >> string ":=")) - def <- inlineDef <|> multilineDef - return (term, def) + def' <- inlineDef <|> multilineDef + return (term, def') where inlineDef :: Parser [Char] ParserState [[Block]] inlineDef = liftM (\d -> [[Plain d]]) $ try (whitespace >> inlines) multilineDef :: Parser [Char] ParserState [[Block]] |