1
0
Fork 0
forked from github/pelican

Merge pull request #2504 from mosra/docs-escaped-backslash

Docs: properly show escaped chars in SLUG_REGEX_SUBSTITUTIONS
This commit is contained in:
Justin Mayer 2019-01-27 10:33:56 +01:00 committed by GitHub
commit d5947b53a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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.