From 7d6d8d7a7c006642b3d6ccc8359e3ab291992b55 Mon Sep 17 00:00:00 2001 From: Kuan-Yi Li Date: Fri, 29 Mar 2024 16:54:53 +0800 Subject: [PATCH] Updated slugify documentation Unicode, case-sensitive reference setting causes error below. ``` yaml.constructor.ConstructorError: expected a mapping node, but found scalar ``` Update related sections in the documentation to address this issue. Newer Python-Markdown has `slugify_unicode` built-in, so this ```yaml markdown_extensions: - toc: slugify: !!python/name:markdown.extensions.toc.slugify_unicode ``` also works for case-insensitive use cases. Fixes: ee1e675da613 ("Update slug reference") --- docs/setup/extensions/python-markdown-extensions.md | 4 ++-- docs/setup/extensions/python-markdown.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/setup/extensions/python-markdown-extensions.md b/docs/setup/extensions/python-markdown-extensions.md index 42f669f04e9..7d2e06328f1 100644 --- a/docs/setup/extensions/python-markdown-extensions.md +++ b/docs/setup/extensions/python-markdown-extensions.md @@ -686,7 +686,7 @@ The following configuration options are supported: -: This option allows for +: This option allows for customization of the slug function. For some languages, the default may not produce good and readable identifiers – consider using another slug function like for example those from [Python Markdown Extensions][Slugs]: @@ -706,7 +706,7 @@ The following configuration options are supported: ``` yaml markdown_extensions: - pymdownx.tabbed: - slugify: !!python/object/apply:pymdownx.slugs.slugify + slugify: !!python/object/apply:pymdownx.slugs.slugify {} ``` The other configuration options of this extension are not officially supported diff --git a/docs/setup/extensions/python-markdown.md b/docs/setup/extensions/python-markdown.md index 4d7b0dfd738..a724e2f25da 100644 --- a/docs/setup/extensions/python-markdown.md +++ b/docs/setup/extensions/python-markdown.md @@ -257,7 +257,7 @@ The following configuration options are supported: ``` yaml markdown_extensions: - toc: - slugify: !!python/object/apply:pymdownx.slugs.slugify + slugify: !!python/object/apply:pymdownx.slugs.slugify {} ```