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: Sources/help/docs.docc/Codelinks.md
+17-3Lines changed: 17 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Codelinks
2
2
3
-
**Codelinks**, also known as **symbol links**, are a markdown shorthand for referencing Swift declarations in documentation.
3
+
**Codelinks**, also known as **symbol links**, are a Markdown shorthand for referencing Swift declarations in documentation. Documentation engines will automatically resolve and expand these references into hyperlinks to the corresponding symbols.
4
4
5
5
You write codelinks using double backticks. Here are some examples:
6
6
@@ -16,7 +16,7 @@ A Swift documentation engine, such as [Unidoc](https://github.com/tayloraswift/s
16
16
``String``
17
17
``String.Index``
18
18
19
-
But in a regular markdown viewer, they will just look like this:
19
+
But in a regular Markdown viewer, they will just look like this:
20
20
21
21
`Int`
22
22
`String`
@@ -32,7 +32,7 @@ Use the slash character (`/`) in place of the period (`.`) separator to mark whe
32
32
|` ``String.Index`` `|``String.Index``|
33
33
|` ``String/Index`` `|``String/Index``|
34
34
35
-
Readers using a regular markdown viewer will see the entire path, but documentation engines will only display the specified path suffix.
35
+
Readers using a regular Markdown viewer will see the entire path, but documentation engines will only display the specified path suffix.
36
36
37
37
38
38
## Linking to functions and subscripts
@@ -136,6 +136,13 @@ You can filter a codelink by phylum to disambiguate it. For example, if you have
Alternatively, you can replace the spaces with hyphens (`-`) to encode the codelink with URL-friendly characters. This is useful when you want to display custom link text.
0 commit comments