Skip to content

Commit

Permalink
Docs: slugify.paths replaces whitespace with - not _ (#2474)
Browse files Browse the repository at this point in the history
Minor documentation fix: when `slugify.paths` is set to `"safe"`, whitespaces are replaced with a hyphen, not an underscore.
  • Loading branch information
nfriedly committed Apr 18, 2024
1 parent 0ec6a6c commit 55e1844
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/content/documentation/content/linking.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight = 50
## Heading id and anchor insertion
While rendering the Markdown content, a unique id will automatically be assigned to each heading.
This id is created by converting the heading text to a [slug](https://en.wikipedia.org/wiki/Semantic_URL#Slug) if `slugify.anchors` is set to `"on"` (the default).
If `slugify.paths` is set to `"safe"`, whitespaces are replaced by `_` and the following characters are stripped: `#`, `%`, `<`, `>`, `[`, `]`, `(`, `)`, \`, `^`, `{`, `|`, `}`.
If `slugify.paths` is set to `"safe"`, whitespaces are replaced by `-` and the following characters are stripped: `#`, `%`, `<`, `>`, `[`, `]`, `(`, `)`, \`, `^`, `{`, `|`, `}`.
If `slugify.paths` is set to `"off"`, no modifications are made, and you may be left with nominally illegal ids.
A number is appended at the end if the slug already exists for that article.
For example:
Expand Down

0 comments on commit 55e1844

Please sign in to comment.