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 %} {% endfor %}
{% endblock %} {% endblock %}
{% if page.meta and page.meta.ᴴₒᴴₒᴴₒ %} {% 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> <script src="{{ 'assets/javascripts/extra/bundle.f719a234.min.js' | url }}" defer></script>
{% endif %} {% endif %}
</body> </body>

View File

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

View File

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