X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3d1fb545dd1f49e0624d3adf20e5568b1c33d8ec..cc9a57b827d7303c37f3b2d271e7c2f661d30e45:/lib/sortify.py?ds=inline

diff --git a/lib/sortify.py b/lib/sortify.py
index c64668b26..46e72d226 100755
--- a/lib/sortify.py
+++ b/lib/sortify.py
@@ -25,7 +25,7 @@ def sortify(value):
 
         Examples :
 
-        >>> sortify('aa') < sortify('a a') < sortify('ą') < sortify('b')
+        >>> sortify('a a') < sortify('aa') < sortify('ą') < sortify('b')
         True
 
         >>> sortify('ź') < sortify('ż')
@@ -39,6 +39,6 @@ def sortify(value):
     # try to replace chars
     value = re.sub('[^a-zA-Z0-9\\s\\-]{1}', replace_char, value)
     value = value.lower()
-    value = re.sub(r'[^a-z0-9~]+', '|', value)
+    value = re.sub(r'[^a-z0-9~]+', ' ', value)
     
     return value.encode('ascii', 'ignore')