You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8
Original file line number
Diff line number
Diff line change
@@ -86,10 +86,10 @@ The autorefs plugin offers a feature called "Markdown anchors". Such anchors can
86
86
The syntax is:
87
87
88
88
```md
89
-
[](){#id-of-the-anchor}
89
+
[](){#id-of-the-anchor}
90
90
```
91
91
92
-
If you look closely, it starts with the usual syntax for a link, `[]()`, except both the text value and URL of the link are empty. Then we see `{#id-of-the-anchor}`, which is the syntax supported by the [`attr_list`](https://python-markdown.github.io/extensions/attr_list/) extension. It sets an HTML id to the anchor element. The autorefs plugin simply gives a meaning to such anchors with ids. Note that raw HTML anchors like `<a id="foo"></a>` are not supported.
92
+
If you look closely, it starts with the usual syntax for a link, `[]()`, except both the text value and URL of the link are empty. Then we see `{#id-of-the-anchor}`, which is the syntax supported by the [`attr_list`](https://python-markdown.github.io/extensions/attr_list/) extension. It sets an HTML id to the anchor element. The autorefs plugin simply gives a meaning to such anchors with ids. Note that raw HTML anchors like `<a id="foo"></a>` are not supported.
93
93
94
94
The `attr_list` extension must be enabled for the Markdown anchors feature to work:
95
95
@@ -108,7 +108,7 @@ Now, you can add anchors to documents:
108
108
```md
109
109
Somewhere in a document.
110
110
111
-
[](){#foobar-paragraph}
111
+
[](){#foobar-paragraph}
112
112
113
113
Paragraph about foobar.
114
114
```
@@ -124,15 +124,15 @@ Check out the [paragraph about foobar][foobar-paragraph].
124
124
If you add a Markdown anchor right above a heading, this anchor will redirect to the heading itself:
125
125
126
126
```md
127
-
[](){#foobar}
127
+
[](){#foobar}
128
128
## A verbose title about foobar
129
129
```
130
130
131
131
Linking to the `foobar` anchor will bring you directly to the heading, not the anchor itself, so the URL will show `#a-verbose-title-about-foobar` instead of `#foobar`. These anchors therefore act as "aliases" for headings. It is possible to define multiple aliases per heading:
132
132
133
133
```md
134
-
[](){#contributing}
135
-
[](){#development-setup}
134
+
[](){#contributing}
135
+
[](){#development-setup}
136
136
## How to contribute to the project?
137
137
```
138
138
@@ -161,11 +161,11 @@ Each page has:
161
161
You don't want to change headings and make them redundant, like `## Arch: Install with package manager` and `## Debian: Install with package manager` just to be able to reference the right one with autorefs. Instead you can do this:
0 commit comments