mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
docs: properly show escaped chars in SLUG_REGEX_SUBSTITUTIONS.
This commit is contained in:
parent
b6d423d2b8
commit
94db14e801
1 changed files with 4 additions and 4 deletions
|
|
@ -588,10 +588,10 @@ corresponding ``*_URL`` setting as string, while others hard-code them:
|
||||||
``'tags.html'``.
|
``'tags.html'``.
|
||||||
|
|
||||||
.. data:: SLUG_REGEX_SUBSTITUTIONS = [
|
.. data:: SLUG_REGEX_SUBSTITUTIONS = [
|
||||||
(r'[^\w\s-]', ''), # remove non-alphabetical/whitespace/'-' chars
|
(r'[^\\w\\s-]', ''), # remove non-alphabetical/whitespace/'-' chars
|
||||||
(r'(?u)\A\s*', ''), # strip leading whitespace
|
(r'(?u)\\A\\s*', ''), # strip leading whitespace
|
||||||
(r'(?u)\s*\Z', ''), # strip trailing whitespace
|
(r'(?u)\\s*\\Z', ''), # strip trailing whitespace
|
||||||
(r'[-\s]+', '-'), # reduce multiple whitespace or '-' to single '-'
|
(r'[-\\s]+', '-'), # reduce multiple whitespace or '-' to single '-'
|
||||||
]
|
]
|
||||||
|
|
||||||
Regex substitutions to make when generating slugs of articles and pages.
|
Regex substitutions to make when generating slugs of articles and pages.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue