Skip to content

Line numbers cause extra blank lines when copy-pasting code #62

@FeBe95

Description

@FeBe95

Steps to reproduce

  1. Go to any page that uses torchlight, e.g. the homepage itself (https://torchlight.dev/)
  2. Find a code block that uses line numbers
  3. Select & copy code
  4. Paste code into a text editor

Expected results

Code is pasted without extra blank lines.

        RequestReceived::class => [                                     ✅
            ...Octane::prepareApplicationForNextOperation(),            ✅
            ...Octane::prepareApplicationForNextRequest(),              ✅
        ],

Actual results

Code is pasted with one extra blank line after every "real" line.

        RequestReceived::class => [                                     ✅

            ...Octane::prepareApplicationForNextOperation(),            ✅

            ...Octane::prepareApplicationForNextRequest(),              ✅

        ],

Screen recording

20250303-1415-48.0885222.mp4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions