Skip to content

Commit 4548afb

Browse files
committed
Fixed search plugin crashing on page titles
1 parent d0d6f19 commit 4548afb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: material/plugins/search/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def create_entry_for_section(self, section, toc, url, page):
161161
# if a page title was set via front matter, use that even though a h1
162162
# might be given or the page name was specified in nav in mkdocs.yml
163163
if not section.title:
164-
section.title = page.meta.get("title", page.title)
164+
section.title = [str(page.meta.get("title", page.title))]
165165

166166
# Compute title and text
167167
title = "".join(section.title).strip()

Diff for: src/plugins/search/plugin.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def create_entry_for_section(self, section, toc, url, page):
161161
# if a page title was set via front matter, use that even though a h1
162162
# might be given or the page name was specified in nav in mkdocs.yml
163163
if not section.title:
164-
section.title = page.meta.get("title", page.title)
164+
section.title = [str(page.meta.get("title", page.title))]
165165

166166
# Compute title and text
167167
title = "".join(section.title).strip()

0 commit comments

Comments
 (0)