A userscript that shows whitespace (space, tabs and carriage returns) in code blocks
- All spaces and tabs are shown.
- It works on repo file and diff-view pages, and gist pages.
- A toggle button is added to each file block and allows you to enable or disable the whitespace view.
- It does not interfere with the selection, copying & pasting of the code.
A CSS tab-size of 2
is set by this script. This will be overridden by GitHub-Dark tab settings.
This script is not fully compatible with the GitHub code folding userscript as they interfere with each other.
File view

Diff view

Hosted with ♥ at GitHub