Skip to content

Commit

Permalink
Fixed numeric tags breaking search
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Nov 25, 2024
1 parent 6288b26 commit d468344
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion material/plugins/search/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/search/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}
Expand Down

0 comments on commit d468344

Please sign in to comment.