From e63aafd62004e3424da46de75c78ba4dc7562af4 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 21 Oct 2013 17:33:42 -0700 Subject: Fix definition lists with internal links in terms (closes #1032). This fix puts braces around a term that contains an internal link, to avoid problems with square brackets. --- tests/Tests/Writers/LaTeX.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index 5f702a85d..8a9519e2e 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -39,6 +39,11 @@ tests = [ testGroup "code blocks" , test latexListing "no identifier" $ codeBlock "hi" =?> ("\\begin{lstlisting}\nhi\n\\end{lstlisting}" :: String) ] + , testGroup "definition lists" + [ "with internal link" =: definitionList [(link "#go" "" (str "testing"), + [plain (text "hi there")])] =?> + "\\begin{description}\n\\itemsep1pt\\parskip0pt\\parsep0pt\n\\item[{\\hyperref[go]{testing}}]\nhi there\n\\end{description}" + ] , testGroup "math" [ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?> "$\\sigma|_{\\{x\\}}$" -- cgit v1.2.3