From fa26548454ab831c91d3bfec7ec472c89493b6b8 Mon Sep 17 00:00:00 2001 From: sujooy17 <2410030294@klh.edu.in> Date: Sat, 1 Nov 2025 15:29:04 +0530 Subject: [PATCH] Clarified that permanent links can include column ranges Added a clarification note explaining that users can create permanent links to specific columns within a line, and that column-level links may not work in all browsers. Fixes issue #40794. --- .../creating-a-permanent-link-to-a-code-snippet.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md index 5336c136abf2..6d7106b13ff4 100644 --- a/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md +++ b/content/get-started/writing-on-github/working-with-advanced-formatting/creating-a-permanent-link-to-a-code-snippet.md @@ -1,6 +1,7 @@ --- title: Creating a permanent link to a code snippet -intro: You can create a permanent link to a specific line or range of lines of code in a specific version of a file or pull request. +intro: You can create a permanent link to a specific line, range of lines, or even a range of columns in a file in a specific version of a file or pull request. When you select part of the code, GitHub automatically generates a link that includes line or column references (for example, `#L2C4-L2C16`). + product: '{% data reusables.gated-features.markdown-ui %}' redirect_from: - /github/managing-your-work-on-github/managing-your-work-with-issues-and-pull-requests/creating-a-permanent-link-to-a-code-snippet @@ -20,6 +21,8 @@ shortTitle: Permanent links 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 does not work in Markdown files, only in comments. +> **Note:** Column-level links (like `#L2C4-L2C16`) may not be supported in all browsers or views yet. + ![Screenshot of an issue comment. A code snippet has a header that lists the file name and line numbers, and a body that lists the code on those lines.](/assets/images/help/repository/rendered-code-snippet.png) > [!TIP]