Skip to content

Commit 1b346eb

Browse files
committed
Fixed tags plugin crashing on numeric tags
1 parent 05af898 commit 1b346eb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

material/plugins/tags/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def on_page_markdown(self, markdown, page, config, files):
100100
tags = page.meta.get("tags", [])
101101
if tags:
102102
for tag in tags:
103-
self.tags[tag].append(page)
103+
self.tags[str(tag)].append(page)
104104

105105
# Inject tags into page (after search and before minification)
106106
def on_page_context(self, context, page, config, nav):

src/plugins/tags/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def on_page_markdown(self, markdown, page, config, files):
100100
tags = page.meta.get("tags", [])
101101
if tags:
102102
for tag in tags:
103-
self.tags[tag].append(page)
103+
self.tags[str(tag)].append(page)
104104

105105
# Inject tags into page (after search and before minification)
106106
def on_page_context(self, context, page, config, nav):

0 commit comments

Comments
 (0)