waylan/Python-Markdown — pull request #150 by flying-sheep (2012-10-21 11:44:43+00:00)
Title: Add option to preserve tabs and fix hardcoded `tab_length` in blockprocessor regexes

since apparently changing the default behavior isn’t acceptable, but since it is important for some applications to preserve tabs in the output (as mentioned in the other bug/pull request), i added this as an option.

as you can see, behavior doesn’t change in the slightest unless `preserve_tabs=True` is passed as keyword argument: the regexes are only changed to accept tabs additionally to spaces, which doesn’t have an effect in a tab-expanded document.

i also added a test for that option.

---

please don’t outright refuse and close it again: if there are qualitative problems i can work them out, if there are other proplems, we can discuss them – but i really want to be able to tell markdown to preserve tabs in a way that doesn’t involve monkeypatching all the changes you see from within a extension.