diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2021-05-18 22:55:47 +0200 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2021-05-18 22:55:47 +0200 |
commit | eb3dff148e67e84362632e63848d40ba808940f4 (patch) | |
tree | 594df8c0bb9ed01112f0f28606df38ddbd5060db /src/Text/Pandoc/Writers | |
parent | fa23effe2567183ec424feda55f507e27f50f7c8 (diff) | |
download | pandoc-eb3dff148e67e84362632e63848d40ba808940f4.tar.gz |
LaTeX writer: separate successive quote chars with thin space
Successive quote characters are separated with a thin space to improve
readability and to prevent unwanted ligatures. Detection of these quotes
sometimes had failed if the second quote was nested in a span element.
Closes: #6958
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/LaTeX.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index bf57937bd..978f94ea0 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -894,8 +894,9 @@ inlineToLaTeX (Quoted qt lst) = do then char '`' <> inner <> char '\'' else char '\x2018' <> inner <> char '\x2019' where - isQuoted (Quoted _ _) = True - isQuoted _ = False + isQuoted (Span _ (x:_)) = isQuoted x + isQuoted (Quoted _ _) = True + isQuoted _ = False inlineToLaTeX (Str str) = do setEmptyLine False liftM literal $ stringToLaTeX TextString str |