Skip to content

Commit d468344

Browse files
committed
Fixed numeric tags breaking search
1 parent 6288b26 commit d468344

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

material/plugins/search/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def create_entry_for_section(self, section, toc, url, page):
215215
entry["tags"] = []
216216
for name in tags:
217217
if name and isinstance(name, (str, int, float, bool)):
218-
entry["tags"].append(name)
218+
entry["tags"].append(str(name))
219219

220220
# Set document boost
221221
search = page.meta.get("search") or {}

src/plugins/search/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ def create_entry_for_section(self, section, toc, url, page):
215215
entry["tags"] = []
216216
for name in tags:
217217
if name and isinstance(name, (str, int, float, bool)):
218-
entry["tags"].append(name)
218+
entry["tags"].append(str(name))
219219

220220
# Set document boost
221221
search = page.meta.get("search") or {}

0 commit comments

Comments
 (0)