Skip to content

Commit e77899f

Browse files
committed
Enable shortcut_reference_links by default
1 parent 73acfc4 commit e77899f

File tree

4 files changed

+44
-1
lines changed

4 files changed

+44
-1
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
* Enable `shortcut_reference_links` by default. These are reference links
6+
without the second pair of brackets, e.g.:
7+
8+
```markdown
9+
See [my website].
10+
11+
[my website]: http://example.com
12+
```
13+
314
## 0.14.2.0 (2024-03-10)
415

516
* Fix WezTerm image rendering when using panes (#182).

lib/Patat/Presentation/Settings.hs

+1
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ defaultExtensionList = ExtensionList $
204204
, Pandoc.Ext_strikeout
205205
, Pandoc.Ext_superscript
206206
, Pandoc.Ext_subscript
207+
, Pandoc.Ext_shortcut_reference_links
207208
]
208209

209210

tests/golden/inputs/links.md

+14
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,17 @@ a title](http://fsf.org "click here for a good time!").
66
Let's talk about [foo][foosite]
77

88
[foosite]: http://foo.com/
9+
10+
---
11+
12+
Some more links:
13+
14+
1. An automatic one: <http://example.com#1>
15+
2. An [inline one](http://example.com#2)
16+
3. A [reference][ref] link
17+
4. A [shortcut reference] link
18+
5. A [titled] link
19+
20+
[ref]: http://example.com#3
21+
[shortcut reference]: http://example.com#4
22+
[titled]: http://example.com#5 'The title'

tests/golden/outputs/links.md.dump

+18-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,21 @@
1010
[inline link](/url)
1111
[one with a title](http://fsf.org "click here for a good time!")
1212
[foo](http://foo.com/)
13-
 1 / 1 
13+
 1 / 2 
14+
15+
{slide}
16+
 links.md 
17+
18+
Some more links:
19+
20+
1. An automatic one: <http://example.com#1>
21+
2. An [inline one]
22+
3. A [reference] link
23+
4. A [shortcut reference] link
24+
5. A [titled] link
25+
26+
[inline one](http://example.com#2)
27+
[reference](http://example.com#3)
28+
[shortcut reference](http://example.com#4)
29+
[titled](http://example.com#5 "The title")
30+
 2 / 2 

0 commit comments

Comments
 (0)