Skip to content

Commit 7e4dca3

Browse files
authored
Merge pull request #220 from nicholasbishop/bishop-link-targets
Add more explanatory text to the C-LINK section
2 parents 91939a7 + 0e41903 commit 7e4dca3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/documentation.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,19 +146,25 @@ The unsafe [`std::ptr::read`] requires the following of the caller.
146146
<a id="c-link"></a>
147147
## Prose contains hyperlinks to relevant things (C-LINK)
148148

149-
Links to methods within the same type usually look like this:
149+
Regular links can be added inline with the usual markdown syntax of
150+
`[text](url)`. Links to other types can be added by marking them with
151+
``[`text`]``, then adding the link target in a new line at the end of
152+
the docstring with ``[`text`]: <target>``, where `<target>` is
153+
described below.
154+
155+
Link targets to methods within the same type usually look like this:
150156

151157
```md
152158
[`serialize_struct`]: #method.serialize_struct
153159
```
154160

155-
Links to other types usually look like this:
161+
Link targets to other types usually look like this:
156162

157163
```md
158164
[`Deserialize`]: trait.Deserialize.html
159165
```
160166

161-
Links may also point to a parent or child module:
167+
Link targets may also point to a parent or child module:
162168

163169
```md
164170
[`Value`]: ../enum.Value.html

0 commit comments

Comments
 (0)