Skip to content

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

@RobertBoes

Description

@RobertBoes

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

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