diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-10-21 17:33:42 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-10-21 17:33:42 -0700 |
commit | e63aafd62004e3424da46de75c78ba4dc7562af4 (patch) | |
tree | 67a23947d75932ba8309042ccb7f2dcee7e3e401 /tests | |
parent | d84624f7754df5b260e86e61ae4d6a59318d18b9 (diff) | |
download | pandoc-e63aafd62004e3424da46de75c78ba4dc7562af4.tar.gz |
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.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Tests/Writers/LaTeX.hs | 5 |
1 files changed, 5 insertions, 0 deletions
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\\}}$" |