changelog_slugs ¶
Changelog-aware heading slugs for Python-Markdown.
DEFAULT_SECTIONS
module-attribute
¶
DEFAULT_SECTIONS = frozenset(
{
"Added",
"Changed",
"Deprecated",
"Removed",
"Fixed",
"Security",
}
)
Default sections following the Keep a Changelog format.
Slugifier ¶
Slugifier for changelog headings with release-scoped subsections.
It recognizes release headings that begin with a version following
SemVer, optionally prefixed with v. For example,
[0.1.0] - 2026-04-11, 0.1.0 some text, and v0.1.0 all resolve
to the release slug v0-1-0.
Subsequent headings matching the configured sections are prefixed
with the current release slug until a non-matching heading is
encountered. The default sections are based on Keep a Changelog.
__init__ ¶
__init__(*, sections=DEFAULT_SECTIONS, extend_sections=())
Initialize the slugifier.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
sections
|
Collection[str]
|
Sections to recognize after a release heading.
Set this when your changelog uses headings such as
|
DEFAULT_SECTIONS
|
extend_sections
|
Collection[str]
|
Additional sections to recognize.
Use this when your changelog includes headings such as
|
()
|