Making line numbers uncopyable

Viewed 1106

I'm working on adding line number support to Rainbow, a syntax highlighter, but I can't figure out how to make the line numbers uncopyable.

Disabling selection via user-select: none; makes an element unhighlightable, but you can still copy its text by highlighting around it and then copying, which ends up copying the line numbers along with code.

Here is a working example of the problem: http://jsfiddle.net/CjJLv/8/

Any help would be appreciated. Thanks!

4 Answers
Related