ppannuto / python-titlecase

Python library to capitalize strings as specified by the New York Times Manual of Style
MIT License
249 stars 38 forks source link

Preserve tabs #89

Open Kirkman opened 2 years ago

Kirkman commented 2 years ago

Is it feasible to offer support for preserving tab characters, the same way you added support for preserving newlines?

I often use this script inside of Sublime Text to help fix text that I copy from spreadsheets, but I pretty much have to do it one column at a time because tab characters get converted to spaces when I use it.

ppannuto commented 2 years ago

Probably, but not something I'll be able to implement any time soon. Happy to take a PR.

Would it make more sense to add as --preserve-whitespace ; special casing new lines makes some sense to me, but not necessarily every whitespace character