dmnd/dedent

Tabs?

moll opened this issue ยท 4 comments

moll commented

Hey,

Is it me or doesn't dedent support dedenting tabs?

Cheers

dmnd commented

I don't use tabs, but PRs welcome. Though I wonder what the expected behaviour is when tabs and spaces are mixed.

moll commented

Presumably ignoring whichever wasn't at the start of the line would be sane behavior. :)

Hi, I ran into the issue that this library still isn't supporting tabs. I did some research with the result that packages like outdent are handling tabs like a single space character. This makes the implementation really simple. In most cases there are no mixed spaces/tabs and if there are and we would handle tabs like spaces, we have an equally broken result as we would encounter with the current implementation (since spaces are trimmed, but tabs are still there).

I will try to implement this and open a pull request, if you are still fine with that @dmnd.

Fixed by #28! ๐ŸŽ‰

I'll try to release a beta version soon. #36