Skip to content

Feature: Support custom starting line number for codeblocks (e.g., start from line 10) #287

@y122972

Description

@y122972

Problem Statement

When sharing code snippets in Markdown (issues, PRs, comments, READMEs, etc.), it is very common to highlight a specific range of lines from a larger file, such as lines 10–20.
(I'm working on some agent app that shows lots of diff codes)

Proposed Solution

// ```javascript {linenos=10}
console.log("This is line 10");
console.log("This is line 11");
// ... up to line 20
// ```

Maybe it already supports this feature? But i can not find docs about that

Alternatives Considered

No response

Use Case

Priority

None

Contribution

  • I am willing to help implement this feature

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions