aboutsummaryrefslogtreecommitdiff
path: root/test/command/wikilinks_title_before_pipe.md
blob: 51bb009bfaaf3e254ce95407799d8c2b96aeba44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# CommonMark

## Reader

```
% pandoc -f commonmark+wikilinks_title_before_pipe -t html --columns 90
[[https://example.org]]

[[title|https://example.org]]

[[Name of page]]

[[Title|Name of page]]
^D
<p><a href="https://example.org" title="wikilink">https://example.org</a></p>
<p><a href="https://example.org" title="wikilink">title</a></p>
<p><a href="Name of page" title="wikilink">Name of page</a></p>
<p><a href="Name of page" title="wikilink">Title</a></p>
```

## Writer

```
% pandoc -t commonmark_x+wikilinks_title_before_pipe -f html
<p><a href="https://example.org" title="wikilink">https://example.org</a></p>
<p><a href="https://example.org" title="wikilink">title</a></p>
<p><a href="Home" title="wikilink">Home</a></p>
<p><a href="Name of page" title="wikilink">Title</a></p>
^D
[[https://example.org]]

[[title|https://example.org]]

[[Home]]

[[Title|Name%20of%20page]]
```

## Regular links should still work

```
% pandoc -f commonmark+wikilinks_title_before_pipe -t html
[Title](Name%20of%20page)
^D
<p><a href="Name%20of%20page">Title</a></p>
```

# Markdown

## Reader

```
% pandoc -f markdown+wikilinks_title_before_pipe -t html --columns 90
[[https://example.org]]

[[title|https://example.org]]

[[Name of page]]

[[Title|Name of page]]
^D
<p><a href="https://example.org" title="wikilink">https://example.org</a></p>
<p><a href="https://example.org" title="wikilink">title</a></p>
<p><a href="Name of page" title="wikilink">Name of page</a></p>
<p><a href="Name of page" title="wikilink">Title</a></p>
```

## Writer

```
% pandoc -t markdown+wikilinks_title_before_pipe -f html
<p><a href="https://example.org" title="wikilink">https://example.org</a></p>
<p><a href="https://example.org" title="wikilink">title</a></p>
<p><a href="Home" title="wikilink">Home</a></p>
<p><a href="Name of page" title="wikilink">Title</a></p>
^D
[[https://example.org]]

[[title|https://example.org]]

[[Home]]

[[Title|Name%20of%20page]]
```