diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 7 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 4 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index e7abbc695..63e3262e7 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -711,9 +711,10 @@ rawVerbatimBlock = try $ do rawTeXBlock :: GenParser Char ParserState Block rawTeXBlock = do failIfStrict - result <- rawLaTeXEnvironment' <|> rawConTeXtEnvironment' + result <- liftM (RawBlock "latex") rawLaTeXEnvironment' + <|> liftM (RawBlock "context") rawConTeXtEnvironment' spaces - return $ RawBlock "latex" result + return result rawHtmlBlocks :: GenParser Char ParserState Block rawHtmlBlocks = do @@ -1186,7 +1187,7 @@ inlineNote = try $ do rawLaTeXInline' :: GenParser Char ParserState Inline rawLaTeXInline' = do failIfStrict - (rawConTeXtEnvironment' >>= return . RawInline "latex") + (rawConTeXtEnvironment' >>= return . RawInline "context") <|> (rawLaTeXEnvironment' >>= return . RawInline "latex") <|> rawLaTeXInline diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index ea8a60771..2951486ce 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -124,9 +124,7 @@ blockToConTeXt (BlockQuote lst) = do blockToConTeXt (CodeBlock _ str) = return $ "\\starttyping" <> cr <> flush (text str) <> cr <> "\\stoptyping" $$ blankline -- blankline because \stoptyping can't have anything after it, inc. '}' -blockToConTeXt (RawBlock "context" str) = return $ text str --- for backwards compatibility, allow latex too: -blockToConTeXt (RawBlock "latex" str) = return $ text str +blockToConTeXt (RawBlock "context" str) = return $ text str <> blankline blockToConTeXt (RawBlock _ _ ) = return empty blockToConTeXt (BulletList lst) = do contents <- mapM listItemToConTeXt lst diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index e6687ff08..131aaddfc 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -184,7 +184,7 @@ blockToLaTeX (CodeBlock (_,classes,_) str) = do else return "verbatim" return $ "\\begin{" <> text env <> "}" $$ flush (text str) $$ "\\end{" <> text env <> "}" $$ cr -- final cr needed because of footnotes -blockToLaTeX (RawBlock "latex" x) = return $ text x +blockToLaTeX (RawBlock "latex" x) = return $ text x <> blankline blockToLaTeX (RawBlock _ _) = return empty blockToLaTeX (BulletList lst) = do items <- mapM listItemToLaTeX lst |