aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2012-06-01 10:50:22 -0700
committerJohn MacFarlane <fiddlosopher@gmail.com>2012-06-01 10:50:22 -0700
commite14712dabd9773a44be9a29fecb903079dac162f (patch)
treed3b5f994a94a959857e5b71b16d9ca94e4180a7e /src/Text/Pandoc/Writers
parent3fd80cd835b06cfcf1e3d729c2af43b5842d3b35 (diff)
downloadpandoc-e14712dabd9773a44be9a29fecb903079dac162f.tar.gz
LaTeX writer: Ensure newline after Verbatim at end of footnote.
This fixes a regression. Also added a test for this.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 650eadbc0..7a4dfc3c4 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -588,13 +588,16 @@ inlineToLaTeX (Note contents) = do
contents' <- blockListToLaTeX contents
modify (\s -> s {stInNote = False})
inTable <- liftM stInTable get
+ let optnl = case reverse contents of
+ (CodeBlock _ _ : _) -> cr
+ _ -> empty
if inTable
then do
curnotes <- liftM stTableNotes get
let marker = cycle ['a'..'z'] !! length curnotes
modify $ \s -> s{ stTableNotes = (marker, contents') : curnotes }
return $ "\\tmark" <> brackets (char marker) <> space
- else return $ "\\footnote" <> braces (nest 2 contents')
+ else return $ "\\footnote" <> braces (nest 2 contents' <> optnl)
-- note: a \n before } needed when note ends with a Verbatim environment
citationsToNatbib :: [Citation] -> State WriterState Doc