1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-15 03:17:40 +01:00

Fixed unpack error in search plugin

This commit is contained in:
squidfunk 2022-12-08 15:14:12 +01:00
parent ee2c7ee15d
commit ad2c800bc4
7 changed files with 11 additions and 13 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -245,7 +245,7 @@
{% endfor %}
{% endblock %}
{% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %}
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.510b91e2.min.css' | url }}">
<link rel="stylesheet" href="{{ 'assets/stylesheets/extra.b3906f4e.min.css' | url }}">
<script src="{{ 'assets/javascripts/extra/bundle.f719a234.min.js' | url }}" defer></script>
{% endif %}
</body>

View File

@ -412,11 +412,10 @@ class Parser(HTMLParser):
data = self.section.title
# Remove element if empty (or only whitespace)
prev, last = data[-2:]
if last == f"<{tag}>":
del data[len(data) - 1:]
elif last.isspace() and prev == f"<{tag}>":
del data[len(data) - 2:]
if data[-1] == f"<{tag}>":
del data[-1:]
elif data[-1].isspace() and data[-2] == f"<{tag}>":
del data[-2:]
# Append to section title or text
else:

View File

@ -412,11 +412,10 @@ class Parser(HTMLParser):
data = self.section.title
# Remove element if empty (or only whitespace)
prev, last = data[-2:]
if last == f"<{tag}>":
del data[len(data) - 1:]
elif last.isspace() and prev == f"<{tag}>":
del data[len(data) - 2:]
if data[-1] == f"<{tag}>":
del data[-1:]
elif data[-1].isspace() and data[-2] == f"<{tag}>":
del data[-2:]
# Append to section title or text
else: