aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2012-08-02 21:14:43 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2012-08-02 21:14:43 -0700
commitd21304bab08248b6b41b7fc7305a5000505e59f6 (patch)
tree0d230e13355b7917e31f794739f4b2a45eb875a5
parent214fef9e27963b0984933ed97bd4554460e102e6 (diff)
downloadpandoc-d21304bab08248b6b41b7fc7305a5000505e59f6.tar.gz
Made markdown reader sensitive to Ext_raw_tex.
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index f8681825f..5426beabe 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -466,8 +466,9 @@ inlineToMarkdown _ (Math InlineMath str) =
return $ "$" <> text str <> "$"
inlineToMarkdown _ (Math DisplayMath str) =
return $ "$$" <> text str <> "$$"
-inlineToMarkdown _ (RawInline f str)
- | f == "html" || f == "latex" || f == "tex" || f == "markdown" =
+inlineToMarkdown opts (RawInline f str)
+ | f == "html" || f == "markdown" ||
+ (isEnabled Ext_raw_tex opts && (f == "latex" || f == "tex")) =
return $ text str
inlineToMarkdown _ (RawInline _ _) = return empty
inlineToMarkdown opts (LineBreak)