diff options
author | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:24:30 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2014-06-20 10:24:30 -0700 |
commit | 12efffa85a257dbe81137f97334b2c6a7e072777 (patch) | |
tree | 5171724689341d504622ccfbc8cff2ea417111a6 /tests/Tests/Writers | |
parent | 1a2a0a3a856cc8cba9be2b565787ea08585da7f1 (diff) | |
download | pandoc-12efffa85a257dbe81137f97334b2c6a7e072777.tar.gz |
LaTeX writer: Fixed strikeout + highlighted code. Closes #1294.
Previously strikeout highlighted code caused an error.
Diffstat (limited to 'tests/Tests/Writers')
-rw-r--r-- | tests/Tests/Writers/LaTeX.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs index 8a9519e2e..6db6542a0 100644 --- a/tests/Tests/Writers/LaTeX.hs +++ b/tests/Tests/Writers/LaTeX.hs @@ -8,7 +8,7 @@ import Tests.Helpers import Tests.Arbitrary() latex :: (ToString a, ToPandoc a) => a -> String -latex = writeLaTeX def . toPandoc +latex = writeLaTeX def{ writerHighlight = True } . toPandoc latexListing :: (ToString a, ToPandoc a) => a -> String latexListing = writeLaTeX def{ writerListings = True } . toPandoc @@ -54,4 +54,14 @@ tests = [ testGroup "code blocks" (text "Header 1" <> note (plain $ text "note")) =?> "\\section*{Header 1\\footnote{note}}\\label{foo}\n\\addcontentsline{toc}{section}{Header 1}\n" ] + , testGroup "inline code" + [ "struck out and highlighted" =: + strikeout (codeWith ("",["haskell"],[]) "foo" <> space + <> str "bar") =?> + "\\sout{\\mbox{\\VERB|\\NormalTok{foo}|} bar}" + , "struck out and not highlighted" =: + strikeout (code "foo" <> space + <> str "bar") =?> + "\\sout{\\texttt{foo} bar}" + ] ] |