Add documentation for line linking in Markdown (#20169)
* Add documentation for line linking in Markdown * Slight rewording Co-authored-by: Ethan P <56270045+ethanpalm@users.noreply.github.com>
This commit is contained in:
@@ -13,6 +13,8 @@ topics:
|
|||||||
- Pull requests
|
- Pull requests
|
||||||
shortTitle: Permanent links to code
|
shortTitle: Permanent links to code
|
||||||
---
|
---
|
||||||
|
## Linking to code
|
||||||
|
|
||||||
This type of permanent link will render as a code snippet only in the repository it originated in. In other repositories, the permalink code snippet will render as a URL.
|
This type of permanent link will render as a code snippet only in the repository it originated in. In other repositories, the permalink code snippet will render as a URL.
|
||||||
|
|
||||||

|

|
||||||
@@ -34,6 +36,12 @@ This type of permanent link will render as a code snippet only in the repository
|
|||||||
6. Paste your permalink into a comment, and click **Comment**.
|
6. Paste your permalink into a comment, and click **Comment**.
|
||||||

|

|
||||||
|
|
||||||
|
## Linking to Markdown
|
||||||
|
|
||||||
|
You can link to specific lines in Markdown files by loading the Markdown file without Markdown rendering. To load a Markdown file without rendering, you can use the `?plain=1` parameter at the end of the url for the file. For example, `github.com/<organization>/<repository>/blob/<branch_name>/README.md?plain=1`.
|
||||||
|
|
||||||
|
You can link to a specific line in the Markdown file the same way you can in code. Append `#L` with the line number or numbers at the end of the url. For example, `github.com/<organization>/<repository>/blob/<branch_name>/README.md?plain=1#L14` will highlight line 14 in the plain README.md file.
|
||||||
|
|
||||||
## Further reading
|
## Further reading
|
||||||
|
|
||||||
- "[Creating an issue](/articles/creating-an-issue/)"
|
- "[Creating an issue](/articles/creating-an-issue/)"
|
||||||
|
|||||||
Reference in New Issue
Block a user