Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

When users copy code, line numbers are included with the copied text. #156

@GoogleCodeExporter

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Get prettyprint.js working on your site and turn line numbers on by 
including the linenums class.
2. Select the text (tested in latest version of chrome) and copy it (ctrl + c).
3. Paste the code somewhere. You will notice line numbers included with the 
paste.

What is the expected output?  What do you see instead?
There are some other sites that have code snippets similar to prettify and also 
include line numbers, but if you copy the text and are careful to not start 
highlighting on the number then you only get the code, no line numbers. It is 
very helpful when you are copying large snippets of code.

What version are you using?  On what browser?
I am using Google Chrome v11.0.696.71 and Windows 7.

Please provide any additional information below.
Is there a way to set this up so it lets users highlight only the code without 
the line numbers? If so, this would be great. If not, how hard would it be to 
add this feature?

Original issue reported on code.google.com by alex.f...@codetunnel.com on 3 Jun 2011 at 5:44

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions