diff options
author | John MacFarlane <jgm@berkeley.edu> | 2011-01-23 10:55:56 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2011-01-26 17:22:53 -0800 |
commit | bd43c0f4c940b755e2d68c7146c7f5201fb181d9 (patch) | |
tree | 502cab13026c8a3263387ae4578cbf5e7fc6a2b7 /src/Text/Pandoc/Readers/Markdown.hs | |
parent | 5bee388914283825491bc1256162f9744743d976 (diff) | |
download | pandoc-bd43c0f4c940b755e2d68c7146c7f5201fb181d9.tar.gz |
Bumped version to 1.8; depend on pandoc-types 1.8.
The old TeX, HtmlInline and RawHtml elements have been removed
and replaced by generic RawInline and RawBlock elements.
All modules updated to use the new raw elements.
Diffstat (limited to 'src/Text/Pandoc/Readers/Markdown.hs')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 0334cf8f4..e7abbc695 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -661,10 +661,10 @@ definitionList = do -- isHtmlOrBlank :: Inline -> Bool -isHtmlOrBlank (HtmlInline _) = True -isHtmlOrBlank (Space) = True -isHtmlOrBlank (LineBreak) = True -isHtmlOrBlank _ = False +isHtmlOrBlank (RawInline "html" _) = True +isHtmlOrBlank (Space) = True +isHtmlOrBlank (LineBreak) = True +isHtmlOrBlank _ = False para :: GenParser Char ParserState Block para = try $ do @@ -693,7 +693,7 @@ htmlBlock = try $ do first <- htmlElement finalSpace <- many spaceChar finalNewlines <- many newline - return $ RawHtml $ first ++ finalSpace ++ finalNewlines + return $ RawBlock "html" $ first ++ finalSpace ++ finalNewlines strictHtmlBlock :: GenParser Char ParserState [Char] strictHtmlBlock = do @@ -713,7 +713,7 @@ rawTeXBlock = do failIfStrict result <- rawLaTeXEnvironment' <|> rawConTeXtEnvironment' spaces - return $ Para [TeX result] + return $ RawBlock "latex" result rawHtmlBlocks :: GenParser Char ParserState Block rawHtmlBlocks = do @@ -730,7 +730,7 @@ rawHtmlBlocks = do return $ blk ++ sps let combined = concat htmlBlocks let combined' = if last combined == '\n' then init combined else combined - return $ RawHtml combined' + return $ RawBlock "html" combined' -- -- Tables @@ -1186,8 +1186,8 @@ inlineNote = try $ do rawLaTeXInline' :: GenParser Char ParserState Inline rawLaTeXInline' = do failIfStrict - (rawConTeXtEnvironment' >>= return . TeX) - <|> (rawLaTeXEnvironment' >>= return . TeX) + (rawConTeXtEnvironment' >>= return . RawInline "latex") + <|> (rawLaTeXEnvironment' >>= return . RawInline "latex") <|> rawLaTeXInline rawConTeXtEnvironment' :: GenParser Char st String @@ -1212,7 +1212,7 @@ rawHtmlInline = do (_,result) <- if stateStrict st then htmlTag (not . isTextTag) else htmlTag isInlineTag - return $ HtmlInline result + return $ RawInline "html" result -- Citations |