From 7e9e959548e665773f7eed388c79ff89d2469d24 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sun, 24 Oct 2010 19:31:06 -0700 Subject: LaTeX & ConTeXt writers: escape [ and ] as {[} and {]}. This avoids unwanted interpretation as optional arguments in some contexts, which caused the brackets to silently disappear! --- src/Text/Pandoc/Writers/LaTeX.hs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/Text/Pandoc/Writers/LaTeX.hs') diff --git a/src/Text/Pandoc/Writers/LaTeX.hs b/src/Text/Pandoc/Writers/LaTeX.hs index 720c00ac8..5fa345760 100644 --- a/src/Text/Pandoc/Writers/LaTeX.hs +++ b/src/Text/Pandoc/Writers/LaTeX.hs @@ -107,6 +107,8 @@ stringToLaTeX = escapeStringUsing latexEscapes , ('|', "\\textbar{}") , ('<', "\\textless{}") , ('>', "\\textgreater{}") + , ('[', "{[}") -- to avoid interpretation as + , (']', "{]}") -- optional arguments , ('\160', "~") ] -- cgit v1.2.3