Skip to content

specify range of lines for embedded local code files #8448

@m-ods

Description

@m-ods

Which Fern component?

Fern Docs

How important is this?

P1 - High (Strongly needed)

What's the feature?

<Code src="snippets/example-code.js"/>

It's great that you can embed code from files but we would also like to have a parameter where I can specify to only include some lines from a snippet. So something like this:

<Code src="snippets/example-code.js" lines={1-20}/>

This would be useful for our tutorials where we go thru a snippet step-by-step.

Any alternatives?

No response

Are you interested in contributing this feature?

No

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions