aboutsummaryrefslogtreecommitdiff
path: root/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-30 02:07:55 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-12-30 02:07:55 +0000
commit6c1f9c8e39d74217319957395de98b4d6a4bc840 (patch)
treea6b4936c429eac5cfb2ec0ca49c2855a33ae4562 /Text
parenta465c4f659b5bd2b67f1a00f64a70eb535ba6ef8 (diff)
downloadpandoc-6c1f9c8e39d74217319957395de98b4d6a4bc840.tar.gz
Made LaTeX reader properly recognize --parse-raw in rawLaTeXInline.
Updated LaTeX reader test to use --parse-raw. git-svn-id: https://pandoc.googlecode.com/svn/trunk@1160 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'Text')
-rw-r--r--Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Text/Pandoc/Readers/LaTeX.hs b/Text/Pandoc/Readers/LaTeX.hs
index ac338c106..dcfa62b92 100644
--- a/Text/Pandoc/Readers/LaTeX.hs
+++ b/Text/Pandoc/Readers/LaTeX.hs
@@ -374,7 +374,7 @@ unknownCommand = try $ do
state <- getState
if name == "item" && (stateParserContext state) == ListItemState
then fail "should not be parsed as raw"
- else string ""
+ else return ""
if stateParseRaw state
then return $ Plain [TeX ("\\" ++ name ++ star ++ argStr)]
else return $ Plain [Str (joinWithSep " " args)]
@@ -648,5 +648,7 @@ rawLaTeXInline = try $ do
if ((name == "begin") || (name == "end") || (name == "item"))
then fail "not an inline command"
else string ""
- return $ TeX ("\\" ++ name ++ star ++ concat args)
+ if stateParseRaw state
+ then return $ TeX ("\\" ++ name ++ star ++ concat args)
+ else return $ Str (joinWithSep " " args)