Skip to content

Commit ec098c3

Browse files
Update links.md
1 parent a7092a4 commit ec098c3

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

cheatsheets/markdown/links.md

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -93,20 +93,18 @@ For example, this will link add `/example.com` to the current path.
9393
Add optional alternative text. You can hover over the link to see the alt text.
9494

9595
**Code:**
96+
9697
```markdown
9798
[link text](https://example.com "alt text")
9899
```
99100

100101
**Result:**
101102

102-
```markdown
103103
[link text](https://example.com "alt text")
104-
```
105104

106105

107106
## Reference-style links
108107

109-
110108
### Text
111109

112110
Example:
@@ -119,17 +117,13 @@ Example:
119117
[arbitrary case-insensitive reference text]: https://www.mozilla.org
120118
```
121119

122-
123120
**Result:**
124121

125-
```markdown
126122
[I'm a reference-style link][Arbitrary case-insensitive reference text]
127123

128124
[arbitrary case-insensitive reference text]: https://www.mozilla.org
129125

130-
```
131-
132-
### Number
126+
### Numbered refrence links
133127

134128
Example:
135129

@@ -143,12 +137,34 @@ Example:
143137

144138
**Result:**
145139

146-
```markdown
147140
[You can use numbers for reference-style link definitions][1]
148141

149142
[1]: http://slashdot.org
143+
144+
Another example - note the links might be in a `## Footnotes` section.
145+
146+
147+
**Code**
148+
149+
```markdown
150+
- `AssertionError` : raised in case of failure of an assertion[1].
151+
152+
...
153+
154+
[1:AssertionError]
155+
An AssertionError is an error generated for something that was thought to be impossible to happen. Usually, it is thrown because of a programming error.
150156
```
151157

158+
**Result**
159+
160+
- `AssertionError` : raised in case of failure of an assertion[1].
161+
162+
...
163+
164+
[1:AssertionError]
165+
An AssertionError is an error generated for something that was thought to be impossible to happen. Usually, it is thrown because of a programming error.
166+
167+
152168
### Link text
153169

154170
Example:
@@ -165,13 +181,6 @@ Or leave it empty and use the [link text itself].
165181

166182
Code:
167183

168-
```markdown
169184
Or leave it empty and use the [link text itself].
170185

171186
[link text itself]: http://www.reddit.com
172-
173-
```
174-
175-
<!--stackedit_data:
176-
eyJoaXN0b3J5IjpbMTQ5NjY4NzU0XX0=
177-
-->

0 commit comments

Comments
 (0)