Created
May 22, 2018 16:58
-
-
Save berdosi/608a361da6a18aaf79f26d72ef547e0a to your computer and use it in GitHub Desktop.
replace 8 character long tabs in github wit shorter lines
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[... document.querySelectorAll(".file td")] | |
.map(td => | |
td.firstChild | |
? td.firstChild.textContent | |
= td.firstChild.textContent | |
.replace( | |
/^(\t+)/, | |
(match, p1) => | |
" ".repeat(4).repeat(p1.length)) | |
: "") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment