You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2021. It is now read-only.
I'm calling the concept of what you're trying to do "normalizing whitespace," because I don't know what the proper name is for it :).
A few notes:
It won't work if the user mixes indentation types (tabs with spaces) within a single block(it doesn't discern between tabs and spaces).
It will overwrite the user's newline character with a \n
Instead of adding a new public method, I changed the existing method signature to have an optional second parameter. true if normalizing the whitespace.
Would be nice if this https://github.com/sindresorhus/pageres/blob/50b2a30dbd2335b1e955ad53dc9226bf52ad578d/cli.js#L16-L31 could be indented on the same level as the method, but return a non-indented string.
Should probably be a separate method.
The text was updated successfully, but these errors were encountered: