3 ms·
I wrote a JS module for detecting indentation some years ago. I ended up with an algorithm [0] that looks for the most common difference between two consecutive
by mofle 11y ago
I wrote a JS module for detecting indentation some years ago. I ended up with an algorithm [0] that looks for the most common difference between two consecutive non-empty lines.
[0]: https://github.com/sindresorhus/detect-indent#algorithm https://github.com/sindresorhus/detect-indent#algorithm