Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy-paste snippet on Firefox adds newline between every line #36

Open
RobertBoes opened this issue Jul 28, 2022 · 1 comment
Open

Copy-paste snippet on Firefox adds newline between every line #36

RobertBoes opened this issue Jul 28, 2022 · 1 comment

Comments

@RobertBoes
Copy link

RobertBoes commented Jul 28, 2022

When viewed on Firefox, if you copy a code snippet from Torchlight it adds an additional newline for every line. Copying an example on the homepage to the clipboard and then pasting results in the following:

<x-code-torchlight language='php'>

    // Any code here will be highlighted by Torchlight!

</x-code-torchlight>

While on Chrome it copies like it should:

<x-code-torchlight language='php'>
    // Any code here will be highlighted by Torchlight!
</x-code-torchlight>

It looks like Firefox copies the span.line-number as an empty line. I removed these elements from the DOM and then copying is as expected

@timbogdanov
Copy link

can you show your example, your issue is not 100% clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants