From 94db14e801c58eb62df9588ae663eb40bbdf2c5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Fri, 4 Jan 2019 17:08:32 +0100 Subject: [PATCH] docs: properly show escaped chars in SLUG_REGEX_SUBSTITUTIONS. --- docs/settings.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/settings.rst b/docs/settings.rst index 640d0571..90b9e570 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -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.