Skip to content

Commit 7d6d8d7

Browse files
kuanyilisquidfunk
authored andcommitted
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: ee1e675 ("Update slug reference")
1 parent e71f00b commit 7d6d8d7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: docs/setup/extensions/python-markdown-extensions.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ The following configuration options are supported:
686686

687687
<!-- md:option pymdownx.tabbed.slugify -->
688688

689-
: <!-- md:default `toc.slugify` --> This option allows for
689+
: <!-- md:default `None` --> This option allows for
690690
customization of the slug function. For some languages, the default may not
691691
produce good and readable identifiers – consider using another slug function
692692
like for example those from [Python Markdown Extensions][Slugs]:
@@ -706,7 +706,7 @@ The following configuration options are supported:
706706
``` yaml
707707
markdown_extensions:
708708
- pymdownx.tabbed:
709-
slugify: !!python/object/apply:pymdownx.slugs.slugify
709+
slugify: !!python/object/apply:pymdownx.slugs.slugify {}
710710
```
711711

712712
The other configuration options of this extension are not officially supported

Diff for: docs/setup/extensions/python-markdown.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ The following configuration options are supported:
257257
``` yaml
258258
markdown_extensions:
259259
- toc:
260-
slugify: !!python/object/apply:pymdownx.slugs.slugify
260+
slugify: !!python/object/apply:pymdownx.slugs.slugify {}
261261
```
262262

263263
<!-- md:option toc.toc_depth -->

0 commit comments

Comments
 (0)