Skip to content

Partially Copying Code Blocks #3436

Open
@soerenmartius

Description

Is your feature request related to a problem? Please describe.

Currently, whenever copying from a code block, all code exposed in that box will be copied. In an ideal world, within the same code block I am able to show a command as well as the resulting output of a command. However, as a user, when copying the code I only want the actual command without the outputs to be copied.

E.g.

```sh
ls # command

file file file file #output

Describe the solution you'd like

Being able to define a line or range of lines of code to be copied from a code block.

```sh{cp1}
ls # command

file file file file #output

Describe alternatives you've considered

No response

Additional context

No response

Validations

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions