aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2011-07-23 08:36:41 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2011-07-23 08:36:41 -0700
commit48368061a1ab3f9def9e63fbb01966c14effbd74 (patch)
tree4dfdb15f86c60e884fccd869bded89362c3fa2f3
parent4dc40c923f2d23dc471169fe2e846b176e302a10 (diff)
downloadpandoc-48368061a1ab3f9def9e63fbb01966c14effbd74.tar.gz
LaTeX writer: don't set stVerbInNote unnecessarily.
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index c4eac4cd9..f169bf553 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -372,10 +372,11 @@ inlineToLaTeX (Cite cits lst) = do
inlineToLaTeX (Code _ str) = do
st <- get
- when (stInNote st) $ modify $ \s -> s{ stVerbInNote = True }
- let chr = ((enumFromTo '!' '~') \\ str) !! 0
if writerListings (stOptions st)
- then return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
+ then do
+ when (stInNote st) $ modify $ \s -> s{ stVerbInNote = True }
+ let chr = ((enumFromTo '!' '~') \\ str) !! 0
+ return $ text $ "\\lstinline" ++ [chr] ++ str ++ [chr]
else return $ text $ "\\texttt{" ++ stringToLaTeX str ++ "}"
inlineToLaTeX (Quoted SingleQuote lst) = do
contents <- inlineListToLaTeX lst