mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2025-02-14 09:22:34 +01:00
Fixed tags plugin crashing on numeric title
This commit is contained in:
parent
a890d6e951
commit
4861c7d405
@ -37,7 +37,9 @@ def tag_name_casefold(tag: Tag, *args):
|
|||||||
|
|
||||||
# Return item title for sorting
|
# Return item title for sorting
|
||||||
def item_title(mapping: Mapping):
|
def item_title(mapping: Mapping):
|
||||||
return mapping.item.title
|
# Note that this must be coerced to a string, as the title might be sourced
|
||||||
|
# from metadata, which can be of any type - see https://t.ly/1AXyo
|
||||||
|
return str(mapping.item.title)
|
||||||
|
|
||||||
# Return item URL for sorting
|
# Return item URL for sorting
|
||||||
def item_url(mapping: Mapping):
|
def item_url(mapping: Mapping):
|
||||||
|
@ -37,7 +37,9 @@ def tag_name_casefold(tag: Tag, *args):
|
|||||||
|
|
||||||
# Return item title for sorting
|
# Return item title for sorting
|
||||||
def item_title(mapping: Mapping):
|
def item_title(mapping: Mapping):
|
||||||
return mapping.item.title
|
# Note that this must be coerced to a string, as the title might be sourced
|
||||||
|
# from metadata, which can be of any type - see https://t.ly/1AXyo
|
||||||
|
return str(mapping.item.title)
|
||||||
|
|
||||||
# Return item URL for sorting
|
# Return item URL for sorting
|
||||||
def item_url(mapping: Mapping):
|
def item_url(mapping: Mapping):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user