torchlight-laravel icon indicating copy to clipboard operation
torchlight-laravel copied to clipboard

Line numbers cause extra blank lines when copy-pasting code

Open FeBe95 opened this issue 9 months ago • 1 comments

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

https://github.com/user-attachments/assets/75bad569-92ab-4a83-933f-23035f36ca27

FeBe95 avatar Mar 03 '25 14:03 FeBe95