aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/LaTeX.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Writers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs
index b77789e90..0674652cf 100644
--- a/src/Text/Pandoc/Writers/LaTeX.hs
+++ b/src/Text/Pandoc/Writers/LaTeX.hs
@@ -78,10 +78,10 @@ escapeSingleQuotes =
escapeEllipses = gsub "\\.\\.\\.|\\. \\. \\." "\\ldots{}"
escapeDashes = gsub "([0-9])-([0-9])" "\\1--\\2" .
- gsub " -- " "---" .
- gsub "([^[:punct:][:space:]])--([^[:punct:][:space:]])" "\\1---\\2"
+ gsub " *--- *" "---" .
+ gsub "([^-])--([^-])" "\\1---\\2"
-escapeSmart = escapeSingleQuotes . escapeDoubleQuotes . escapeDashes . escapeEllipses
+escapeSmart = escapeDashes . escapeSingleQuotes . escapeDoubleQuotes . escapeEllipses
-- | Escape string for LaTeX (including smart quotes, dashes, ellipses)
stringToLaTeX :: String -> String