aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-05-27 11:26:38 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-05-27 11:26:38 -0700
commit6972a7dc9158c1d56b2dc9a06f596386f6b30860 (patch)
tree35c18ea6d50182a62374a49cd6246b89247c003a /test
parentcbe16b2866abd8d0e4c15f027562b4b2bed3f01e (diff)
downloadpandoc-6972a7dc9158c1d56b2dc9a06f596386f6b30860.tar.gz
Modify rebase_reference_links treatment of reference links/images.
The directory is based on the file containing the link reference, not the file containing the link, if these differ.
Diffstat (limited to 'test')
-rw-r--r--test/command/3752.md5
-rw-r--r--test/command/chap1/text.md2
-rw-r--r--test/command/chap2/text.md2
3 files changed, 8 insertions, 1 deletions
diff --git a/test/command/3752.md b/test/command/3752.md
index 76d51989b..6d31eb450 100644
--- a/test/command/3752.md
+++ b/test/command/3752.md
@@ -2,12 +2,14 @@
% pandoc command/chap1/text.md command/chap2/text.md -f markdown+rebase_relative_paths --verbose -t docx | pandoc -f docx -t plain
^D
[INFO] Loaded command/chap1/spider.png from ./command/chap1/spider.png
-[INFO] Loaded command/chap1/../../lalune.jpg from ./command/chap1/../../lalune.jpg
[INFO] Loaded command/chap2/spider.png from ./command/chap2/spider.png
+[INFO] Loaded command/chap1/../../lalune.jpg from ./command/chap1/../../lalune.jpg
Chapter one
A spider: [spider]
+Another spider: [another spider]
+
The moon: [moon]
Link to spider picture.
@@ -26,6 +28,7 @@ A spider: [spider]
^D
<h1 id="chapter-one">Chapter one</h1>
<p>A spider: <img src="command/chap1/spider.png" alt="spider" /></p>
+<p>Another spider: <img src="command/chap2/spider.png" alt="another spider" /></p>
<p>The moon: <img src="command/chap1/../../lalune.jpg" alt="moon" /></p>
<p>Link to <a href="command/chap1/spider.png">spider picture</a>.</p>
<p>URL left alone: <a href="https://pandoc.org/MANUAL.html">manual</a>.</p>
diff --git a/test/command/chap1/text.md b/test/command/chap1/text.md
index 88b30313d..d25514241 100644
--- a/test/command/chap1/text.md
+++ b/test/command/chap1/text.md
@@ -2,6 +2,8 @@
A spider: ![spider](spider.png)
+Another spider: ![another spider][refspider]
+
The moon: ![moon](../../lalune.jpg)
Link to [spider picture](spider.png).
diff --git a/test/command/chap2/text.md b/test/command/chap2/text.md
index 435a266d7..082a1d79e 100644
--- a/test/command/chap2/text.md
+++ b/test/command/chap2/text.md
@@ -1,3 +1,5 @@
# Chapter two
A spider: ![spider](spider.png)
+
+[refspider]: spider.png