aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-09-29 23:29:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-09-29 23:29:32 -0700
commit966bd94ba268216f9d1492287638fd0b725dd503 (patch)
tree3caa8d43cd112e5768ecf9de1477a13b8b3bfeac /src/Text/Pandoc/Writers
parent190ee279c9c10c6e87248428dcdbd73ab9036373 (diff)
downloadpandoc-966bd94ba268216f9d1492287638fd0b725dd503.tar.gz
LaTeX writer: Fix description lists contining highlighted code.
Closes #4662.
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index 6042f2765..7be3fce28 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -870,9 +870,11 @@ defListItemToLaTeX (term, defs) = do
else term'
def' <- liftM vsep $ mapM blockListToLaTeX defs
return $ case defs of
- ((Header{} : _) : _) ->
+ ((Header{} : _) : _) ->
"\\item" <> brackets term'' <> " ~ " $$ def'
- _ ->
+ ((CodeBlock{} : _) : _) -> -- see #4662
+ "\\item" <> brackets term'' <> " ~ " $$ def'
+ _ ->
"\\item" <> brackets term'' $$ def'
-- | Craft the section header, inserting the secton reference, if supplied.