summaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-19 22:41:12 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-19 23:14:23 -0800
commit244cd5644b44f43722530379138bd7bb9cbace9b (patch)
tree771cf6688ca92dc054616318372e6759fb594587 /tests/Tests
parent1ad296dc69d0e901ce26d446b57758feea5a52c6 (diff)
parent08243d53a68239fe60fdcb59ee71f6562b16f5c7 (diff)
Merge branch 'new-image-attributes' of https://github.com/mb21/pandoc into mb21-new-image-attributes
* Bumped version to 1.16. * Added Attr field to Link and Image. * Added `common_link_attributes` extension. * Updated readers for link attributes. * Updated writers for link attributes. * Updated tests * Updated stack.yaml to build against unreleased versions of pandoc-types and texmath. * Fixed various compiler warnings. Closes #261. TODO: * Relative (percentage) image widths in docx writer. * ODT/OpenDocument writer (untested, same issue about percentage widths). * Update pandoc-citeproc.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Arbitrary.hs10
-rw-r--r--tests/Tests/Writers/LaTeX.hs2
2 files changed, 7 insertions, 5 deletions
diff --git a/tests/Tests/Arbitrary.hs b/tests/Tests/Arbitrary.hs
index 3675d97bf..d792e1375 100644
--- a/tests/Tests/Arbitrary.hs
+++ b/tests/Tests/Arbitrary.hs
@@ -56,14 +56,16 @@ arbInline n = frequency $ [ (60, liftM Str realString)
, (10, do x1 <- arbitrary
x2 <- realString
return $ Math x1 x2)
- , (10, do x1 <- arbInlines (n-1)
+ , (10, do x0 <- arbAttr
+ x1 <- arbInlines (n-1)
x3 <- realString
x2 <- liftM escapeURI realString
- return $ Link x1 (x2,x3))
- , (10, do x1 <- arbInlines (n-1)
+ return $ Link x0 x1 (x2,x3))
+ , (10, do x0 <- arbAttr
+ x1 <- arbInlines (n-1)
x3 <- realString
x2 <- liftM escapeURI realString
- return $ Image x1 (x2,x3))
+ return $ Image x0 x1 (x2,x3))
, (2, liftM2 Cite arbitrary (arbInlines 1))
, (2, liftM Note $ resize 3 $ listOf1 $ arbBlock (n-1))
]
diff --git a/tests/Tests/Writers/LaTeX.hs b/tests/Tests/Writers/LaTeX.hs
index 27931dc28..05dfcbd3d 100644
--- a/tests/Tests/Writers/LaTeX.hs
+++ b/tests/Tests/Writers/LaTeX.hs
@@ -42,7 +42,7 @@ tests = [ testGroup "code blocks"
, testGroup "definition lists"
[ "with internal link" =: definitionList [(link "#go" "" (str "testing"),
[plain (text "hi there")])] =?>
- "\\begin{description}\n\\tightlist\n\\item[\\protect\\hyperlink{go}{testing}]\nhi there\n\\end{description}"
+ "\\begin{description}\n\\tightlist\n\\item[{\\protect\\hyperlink{go}{testing}}]\nhi there\n\\end{description}"
]
, testGroup "math"
[ "escape |" =: para (math "\\sigma|_{\\{x\\}}") =?>