SourceCodeSyntaxHighlight icon indicating copy to clipboard operation
SourceCodeSyntaxHighlight copied to clipboard

Copy without line numbers

Open cycle2zhou opened this issue 2 years ago • 2 comments

image

Here is the preview file

image Select row copy
DROP TABLE IF EXISTS `t_manual`;
   24 CREATE TABLE `t_manual` (
   25   `id` bigint(20) NOT NULL,
   26   `project_id` bigint(20) DEFAULT NULL,
   27   `manual_name` varchar(64) DEFAULT NULL,
   28   `business_time` varchar(128) DEFAULT NULL,
   29   `create_time` datetime DEFAULT NULL,
   30   `creator` varchar(64) DEFAULT NULL,
   31   PRIMARY KEY (`id`)
   32 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

The copied content has a line number, which makes no sense

cycle2zhou avatar Sep 20 '22 02:09 cycle2zhou

I'm having the same issue, and this is actually a problem upstream in highlight, so I've opened an issue over there https://gitlab.com/saalen/highlight/-/issues/214

dotsam avatar Oct 13 '22 20:10 dotsam

The highlight author has added the same CSS that Syntax Highlight has had in its custom stylesheet since 2001, but there was a WebKit bug that was only fixed at the end of 2022, and didn't land in a Safari release until 16.4 in March 2023, so this has actually been working in Syntax Highlight since then

dotsam avatar Apr 28 '24 21:04 dotsam