summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorAndriy Orehov <andriyorehov@gmail.com>2019-01-03 18:28:01 +0200
committerVal Neekman <un33kvu@gmail.com>2019-01-03 11:28:01 -0500
commit646761e5b4c73b9be7285c60eab4e10c30fe32f4 (patch)
tree4c348129e15ad554ef1201c95c4db5be2738bb89 /README.md
parentc357ee590b2e799e62229e656e566cc9b7298498 (diff)
downloadpython-slugify-646761e5b4c73b9be7285c60eab4e10c30fe32f4.tar.gz
add support user-specific replacements (#66)
thx
Diffstat (limited to 'README.md')
-rw-r--r--README.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/README.md b/README.md
index d58daee..bc4d9e8 100644
--- a/README.md
+++ b/README.md
@@ -98,6 +98,10 @@ How to use
r = slugify(txt, separator='_', regex_pattern=regex_pattern)
self.assertNotEqual(r, "_this_is_a_test_")
+ txt = '10 | 20 %'
+ r = slugify(txt, replacements=[['|', 'or'], ['%', 'percent']])
+ self.assertEqual(r, "10-or-20-percent")
+
```
For more examples, have a look at the [test.py](test.py) file.