mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-24 15:44:59 +08:00
Support rebase_relative_paths for commonmark based formats.
(Including `gfm`.)
This commit is contained in:
@@ -42,3 +42,19 @@ A spider: [spider]
|
||||
<h1 id="chapter-two">Chapter two</h1>
|
||||
<p>A spider: <img src="command/chap2/spider.png" alt="spider" /></p>
|
||||
```
|
||||
|
||||
```
|
||||
% pandoc command/chap1/text.md command/chap2/text.md -f commonmark+rebase_relative_paths -t html
|
||||
^D
|
||||
<h1>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>
|
||||
<p>Absolute path left alone: <a href="/foo/bar/baz.png">absolute</a>.</p>
|
||||
<p>Link to fragment: <a href="#chapter-two">chapter two</a>.</p>
|
||||
<p>Empty path: <a href="">empty</a>.</p>
|
||||
<h1>Chapter two</h1>
|
||||
<p>A spider: <img src="command/chap2/spider.png" alt="spider" /></p>
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user