Skip to content

Commit

Permalink
Cap maximum sub-section name length
Browse files Browse the repository at this point in the history
  • Loading branch information
snejus committed Dec 4, 2024
1 parent 5524cfb commit 28779c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extra/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
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"), # make sections headers
(r"^(\w[^\n]{81,}):(?=\n\n[^ ])", r"**\1**"), # make sections headers
(r"^- `/?plugins/(\w+)`:?", r"- Plugin **`\1`**:"), # highlight plugins
(r"^- `(\w+)-cmd`:?", r"- Command **`\1`**:"), # highlight commands
(r"### [^\n]+\n+(?=### )", ""), # remove empty sections
Expand Down
5 changes: 5 additions & 0 deletions test/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ def rst_changelog():
* First
* Second
Section naaaaaaaaaaaaaaaaaaaaaaaammmmmmmmmmmmmmmmeeeeeeeeeeeeeee with over 80
characters:
Empty section:
Other changes:
Expand Down Expand Up @@ -85,6 +88,8 @@ def md_changelog():
- First
- Second
**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)
Expand Down

0 comments on commit 28779c3

Please sign in to comment.