jehiah/urlnorm — pull request #10 by robolson (2013-06-15 01:24:22+00:00)
Title: Avoid collapsing slashes that follow http or https

Code to address #9

I have done very little Python programming so I'm very open to any style feedback.

I am not terribly happy with how the implementation turned out. I tried very hard to do it inside of the `_collapse` regex but negative lookbehind assertions only accept fixed length strings. So I could test http or https but not the expression `https?`.

Summary of the implementation:
I removed "//" from the `_collapse` expression and now extract double slashes in the `collapse_double_slashes` method where I check if it is preceded by http or https before removing the slashes.