1
0
mirror of https://github.com/squidfunk/mkdocs-material.git synced 2024-11-12 01:50:52 +01:00

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: ee1e675da6 ("Update slug reference")
This commit is contained in:
Kuan-Yi Li 2024-03-29 16:54:53 +08:00 committed by Martin Donath
parent e71f00b4c9
commit 7d6d8d7a7c
2 changed files with 3 additions and 3 deletions

View File

@ -686,7 +686,7 @@ The following configuration options are supported:
<!-- md:option pymdownx.tabbed.slugify -->
: <!-- md:default `toc.slugify` --> This option allows for
: <!-- md:default `None` --> 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

View File

@ -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 {}
```
<!-- md:option toc.toc_depth -->