question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

GitHub bug: tabs are missing 2 characters in diffs

See original GitHub issue

I think that GitHub changed markup for diff UI containing diff markers. Right now markers are being hidden using visibility: hidden (link), but we may need to use display: none.

This fails when the first character of the line is a tab, in which case it gets collapsed. This can be clearly seen code starting with spaces (demo).

And yes, using display: none on the pseudo elements did fix this for me, for code indented with tabs and spaces.

Test

Screenshot

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fregantecommented, May 3, 2020

Perhaps it’s better to open a new, clearer issue for a feature request. Can you open it?

0reactions
fregantecommented, May 2, 2020

This is likely happening because the line (as far as the browser is concerned) includes the diff signs and the space after it. That’s 2 extra characters that shouldn’t be there.

I don’t know if there’s an easy way to convince the browser to start after the diff signs. My guess is that a block element resets the tabulations.

Maybe we can fix their bug, maybe not. Either way I suggest reporting it to GitHub:

The first tab is shown as 6 characters instead of 8
Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub bug: tabs are missing 2 characters in diffs · Issue #3052
I think that GitHub changed markup for diff UI containing diff markers. Right now markers are being hidden using visibility: hidden (link), but...
Read more >
Tabs in diffs are not rendered correctly · Issue #8616
Steps to reproduce the behavior · Modify anything, be sure that the modified line should begin with a tab character · See diff...
Read more >
About comparing branches in pull requests
Pull requests display diffs to compare the changes you made in your topic branch against the base branch that you want to merge...
Read more >
tabs disappeared · Issue #80319 · microsoft/vscode
// Controls whether the diff editor shows changes in leading or trailing whitespace as diffs. "diffEditor.ignoreTrimWhitespace": true,. // ...
Read more >
Installation fails · Issue #322 · databus23/helm-diff
It resolves multiple urls from the GitHub api, but treats them as a single url, causing the Illegal characters found in URL message....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found