diff --git a/extra/release.py b/extra/release.py index 75ba0b7b5..b8aa28f46 100755 --- a/extra/release.py +++ b/extra/release.py @@ -35,7 +35,8 @@ RST_REPLACEMENTS: list[Replacement] = [ MD_REPLACEMENTS: list[Replacement] = [ (r"^ (- )", r"\1"), # remove indent from top-level bullet points (r"^ +( - )", r"\1"), # adjust nested bullet points indent - (r"^(\w[^\n]+):(?=\n\n[^ ])", r"### \1"), # make sections headers + (r"^(\w[^\n]{,80}):(?=\n\n[^ ])", r"### \1"), # format section headers + (r"^(\w[^\n]{81,}):(?=\n\n[^ ])", r"**\1**"), # and bolden too long ones (r"^- `/?plugins/(\w+)`:?", r"- Plugin **`\1`**:"), # highlight plugins (r"^- `(\w+)-cmd`:?", r"- Command **`\1`**:"), # highlight commands (r"### [^\n]+\n+(?=### )", ""), # remove empty sections diff --git a/test/test_release.py b/test/test_release.py index f69389d54..39b6b63fc 100644 --- a/test/test_release.py +++ b/test/test_release.py @@ -45,6 +45,9 @@ Bug fixes: * First * Second +Section naaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmmmmmeeeeeeeeeeeeeee with over 80 +characters: + Empty section: Other changes: @@ -85,6 +88,8 @@ You can do something with this command: - First nested bullet point with some text that wraps to the next line - Second nested bullet point +**Section naaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmmmmmeeeeeeeeeeeeeee with over 80 characters** + ### Other changes - Changed `bitesize` label to `good first issue`. Our [contribute](https://github.com/beetbox/beets/contribute) page is now automatically populated with these issues. :bug: (\#4855)