From d46834475140223d2c322e5deab98e26789e04d9 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Mon, 25 Nov 2024 18:23:53 +0100 Subject: [PATCH] Fixed numeric tags breaking search --- material/plugins/search/plugin.py | 2 +- src/plugins/search/plugin.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/material/plugins/search/plugin.py b/material/plugins/search/plugin.py index 120e7e23d9d..9f12a3e86f4 100644 --- a/material/plugins/search/plugin.py +++ b/material/plugins/search/plugin.py @@ -215,7 +215,7 @@ def create_entry_for_section(self, section, toc, url, page): entry["tags"] = [] for name in tags: if name and isinstance(name, (str, int, float, bool)): - entry["tags"].append(name) + entry["tags"].append(str(name)) # Set document boost search = page.meta.get("search") or {} diff --git a/src/plugins/search/plugin.py b/src/plugins/search/plugin.py index 120e7e23d9d..9f12a3e86f4 100644 --- a/src/plugins/search/plugin.py +++ b/src/plugins/search/plugin.py @@ -215,7 +215,7 @@ def create_entry_for_section(self, section, toc, url, page): entry["tags"] = [] for name in tags: if name and isinstance(name, (str, int, float, bool)): - entry["tags"].append(name) + entry["tags"].append(str(name)) # Set document boost search = page.meta.get("search") or {}