docs: properly show escaped chars in SLUG_REGEX_SUBSTITUTIONS.

This commit is contained in:
Vladimír Vondruš 2019-01-04 17:08:32 +01:00
commit 94db14e801

View file

@ -588,10 +588,10 @@ corresponding ``*_URL`` setting as string, while others hard-code them:
``'tags.html'``.
.. data:: SLUG_REGEX_SUBSTITUTIONS = [
(r'[^\w\s-]', ''), # remove non-alphabetical/whitespace/'-' chars
(r'(?u)\A\s*', ''), # strip leading whitespace
(r'(?u)\s*\Z', ''), # strip trailing whitespace
(r'[-\s]+', '-'), # reduce multiple whitespace or '-' to single '-'
(r'[^\\w\\s-]', ''), # remove non-alphabetical/whitespace/'-' chars
(r'(?u)\\A\\s*', ''), # strip leading whitespace
(r'(?u)\\s*\\Z', ''), # strip trailing whitespace
(r'[-\\s]+', '-'), # reduce multiple whitespace or '-' to single '-'
]
Regex substitutions to make when generating slugs of articles and pages.