-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open
Description
Contribution guidelines
- I've read the contribution guidelines and wholeheartedly agree
I've found a bug and checked that ...
- ... the problem doesn't occur with the
mkdocs
orreadthedocs
themes - ... the problem persists when all overrides are removed, i.e.
custom_dir
,extra_javascript
andextra_css
- ... the documentation does not mention anything about my problem
- ... there are no open or closed issues that are related to my problem
Description
When building the site with the material theme jinja2 complains with a DeprecationWarning
Expected behaviour
No DeprecationWarning is raised
Actual behaviour
DeprecationWarning: invalid escape sequence '\s'
The above exception was the direct cause of the following exception:
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/lexer.py:652: in wrap
self._normalize_newlines(value_str[1:-1])
E DeprecationWarning: decoding with 'unicode-escape' codec failed (DeprecationWarning: invalid escape sequence '\s')
The above exception was the direct cause of the following exception:
tests/e2e/test_plugin.py:123: in test_plugin_creates_weekly_rss_feed
build.build(config) # act
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/mkdocs/commands/build.py:306: in build
_build_theme_template(template, env, files, config, nav)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/mkdocs/commands/build.py:111: in _build_theme_template
output = _build_template(template_name, template, files, config, nav)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/mkdocs/commands/build.py:90: in _build_template
output = template.render(context)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/environment.py:1291: in render
self.environment.handle_exception()
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/environment.py:925: in handle_exception
raise rewrite_traceback_stack(source=source)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/material/404.html:4: in top-level template code
{% extends "main.html" %}
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/material/main.html:4: in top-level template code
{% extends "base.html" %}
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/material/base.html:4: in top-level template code
{% import "partials/language.html" as lang with context %}
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/environment.py:1399: in make_module
return TemplateModule(self, ctx)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/environment.py:1529: in __init__
body_stream = list(template.root_render_func(context)) # type: ignore
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/material/partials/language.html:4: in top-level template code
{% import "partials/languages/" ~ config.theme.language ~ ".html" as lang %}
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/jinja2/environment.py:925: in handle_exception
raise rewrite_traceback_stack(source=source)
../../.venvs/mkdocs-newsletter/lib/python3.9/site-packages/material/partials/languages/en.html:19: in template
"search.config.separator": "[\s\-]+",
E jinja2.exceptions.TemplateSyntaxError: invalid escape sequence '\s')
Steps to reproduce
- Build the site programmatically with warnings set.
Package versions
- Python:
Python 3.9.10
- MkDocs:
mkdocs, version 1.2.3 from ../mkdocs-newsletter/lib/python3.9/site-packages/mkdocs (Python 3.9)
- Material:
Version: 8.2.5
Configuration
---
site_name: The Blue Book
site_description: My second brain
site_author: Lyz
site_url: https://lyz-code.github.io/blue-book
site_dir: site
nav:
- Introduction: index.md
plugins:
- git-revision-date-localized:
type: timeago
- autolinks
- section-index
- mkdocs-newsletter
markdown_extensions:
- toc:
baselevel: 2
theme:
name: material
logo: img/logo.bmp
System information
- Operating system: Debian
- Browser: Irrelevant
Metadata
Metadata
Assignees
Labels
bugIssue reports a bugIssue reports a bugresolvedIssue is resolved, yet unreleased if openIssue is resolved, yet unreleased if open