sindresorhus/refined-github

Hide extra spaces in embedded code (`show-whitespace`) #2285

fregante posted onGitHub

First noted here: https://github.com/sindresorhus/refined-github/pull/2073#issuecomment-495856632

Technically a GitHub bug, but it appears to be pretty consistent: There's an extra space at the beginning and at the end of each line.

show-whitespace should skip these spaces when rendering embedded code.

Screenshot

<img width="651" alt="broken" src="https://user-images.githubusercontent.com/1402241/74159966-9f7f3080-4c57-11ea-9fd7-756fd4fbd848.png">

Live tests

https://github.com/sindresorhus/refined-github/blob/2e4a24d3957c205c7bc49525c69e1fa08593d2ca/readme.md#L107-L112

https://github.com/sindresorhus/refined-github/blob/0b40361983b362d028fac2fe0fed9486134fa41e/package.json#L1-L4


If implemented, wouldn't the fix be broken for embedded code when GitHub "eventually" fixes it?

Pinging @lukehefson @shayfrendt

posted by notlmn over 5 years ago

Refined GitHub:

posted by fregante over 5 years ago

If implemented, wouldn't the fix be broken for embedded code when GitHub "eventually" fixes it?

And then we'll fix it again, it's better than waiting until that maybe happens.

posted by fregante over 5 years ago

Fund this Issue

$0.00
Funded

Pull requests