sindresorhus/refined-github

`show-whitespace` isn't wrapped to next line properly #2991

jack1142 posted onGitHub

https://github.com/discord/discord-api-docs/pull/1396/files#diff-99b76a48d014c043f2f8804f6653ed82 image

There's also a little different problem happening when GitHub Dark is enabled but I'm not sure if this is something you want to fix as well: image


This one is though. There's no easy way to show the whitespace without compromising the copy-paste.

Currently we just overlay the •→ symbols via :before pseudo-element with position: absolute; this can't support the regular inline line breaking.

posted by fregante almost 5 years ago

A solution could be wrapping each whitespace in its own element. This feature is already set up to only act on the visible lines so it might handle the extra operations without slowing down (except when the user scrolls past a lot of files very quickly)

posted by fregante almost 5 years ago

I'm trying this out now, I can't replicate that wrapping behavior at all in both Chrome and Firefox. The spaces never wrap:

With RG

<img width="882" alt="" src="https://user-images.githubusercontent.com/1402241/87654642-83784180-c757-11ea-8804-3152d0a23eda.png">

Without RG

<img width="892" alt="" src="https://user-images.githubusercontent.com/1402241/87654754-a99de180-c757-11ea-9d08-dc30219b64fd.png">

cc @notlmn

posted by fregante over 4 years ago

Fund this Issue

$0.00
Funded

Pull requests