Skip to content

Commit

Permalink
LaTeX writer: use % after hypertarget before code block
Browse files Browse the repository at this point in the history
  • Loading branch information
jgm committed Mar 2, 2017
1 parent 9e50319 commit 8709b7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Text/Pandoc/Writers/LaTeX.hs
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,10 @@ blockToLaTeX (BlockQuote lst) = do
blockToLaTeX (CodeBlock (identifier,classes,keyvalAttr) str) = do
opts <- gets stOptions
lab <- labelFor identifier
linkAnchor <- hypertarget True identifier lab
linkAnchor' <- hypertarget True identifier lab
let linkAnchor = if isEmpty linkAnchor'
then empty
else linkAnchor' <> "%"
let lhsCodeBlock = do
modify $ \s -> s{ stLHS = True }
return $ flush (linkAnchor $$ "\\begin{code}" $$ text str $$
Expand Down

0 comments on commit 8709b7c

Please sign in to comment.