Skip to content

Commit

Permalink
Fixed search plugin crashing on page titles
Browse files Browse the repository at this point in the history
  • Loading branch information
squidfunk committed Jan 3, 2023
1 parent d0d6f19 commit 4548afb
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
Expand Up @@ -161,7 +161,7 @@ def create_entry_for_section(self, section, toc, url, page):
# if a page title was set via front matter, use that even though a h1
# might be given or the page name was specified in nav in mkdocs.yml
if not section.title:
section.title = page.meta.get("title", page.title)
section.title = [str(page.meta.get("title", page.title))]

# Compute title and text
title = "".join(section.title).strip()
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/search/plugin.py
Expand Up @@ -161,7 +161,7 @@ def create_entry_for_section(self, section, toc, url, page):
# if a page title was set via front matter, use that even though a h1
# might be given or the page name was specified in nav in mkdocs.yml
if not section.title:
section.title = page.meta.get("title", page.title)
section.title = [str(page.meta.get("title", page.title))]

# Compute title and text
title = "".join(section.title).strip()
Expand Down

0 comments on commit 4548afb

Please sign in to comment.