close
The Wayback Machine - https://web.archive.org/web/20211026093350/https://github.community/t/wrong-tab-size-in-diff-because-of-data-code-marker/201887

Wrong tab size in diff because of data-code-marker

Left: tab size is correct (8 spaces) when viewing code
Right: tab size is wrong (6 spaces) when viewing diff

I think this is because of data-code-marker (the column to show + and - signs), which is 2 spaces wide. A possible solution may be to wrap the actual code inside a <span class="d-inline-block">. (Sourcegraph seems to use this and it displays tab size correctly in diff.)