News for hackers. Stuff that matters.
Re:Grumpy Website by Grimburger on Tuesday August 29, 2023 @03:06AM (#37304337)
> If you extend source code with line numbers, make sure those aren’t selectable

[shakes fist at so many blogs]

Re:Grumpy Website by ben165 on Tuesday August 29, 2023 @04:47AM (#37304940)
Mhmm... if you don't want to make it selectable you need wonderful JS or tables to seperate it? Makes thing more complicated.

Just remove the line numbers, every editor can mark in block mode today. Some snippets won't work without further code anyways.

Re:Grumpy Website by positus on Tuesday August 29, 2023 @09:36AM (#37307712)
Something like...

.line-number { user-select: none; -moz-user-select: none; -webkit-user-select: none; }

...should be sufficient to prevent that bit from being selected without JS.