mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2024-11-28 01:10:58 +01:00
Fixed search plugin crashing on page titles
This commit is contained in:
parent
d0d6f19db8
commit
4548afb37a
@ -161,7 +161,7 @@ class SearchIndex:
|
|||||||
# if a page title was set via front matter, use that even though a h1
|
# 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
|
# might be given or the page name was specified in nav in mkdocs.yml
|
||||||
if not section.title:
|
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
|
# Compute title and text
|
||||||
title = "".join(section.title).strip()
|
title = "".join(section.title).strip()
|
||||||
|
@ -161,7 +161,7 @@ class SearchIndex:
|
|||||||
# if a page title was set via front matter, use that even though a h1
|
# 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
|
# might be given or the page name was specified in nav in mkdocs.yml
|
||||||
if not section.title:
|
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
|
# Compute title and text
|
||||||
title = "".join(section.title).strip()
|
title = "".join(section.title).strip()
|
||||||
|
Loading…
Reference in New Issue
Block a user