Cap maximum sub-section name length

This commit is contained in:
Šarūnas Nejus 2024-12-04 04:35:11 +00:00
parent 0b905e1b17
commit 779ba791f9
No known key found for this signature in database
GPG key ID: DD28F6704DBE3435
2 changed files with 7 additions and 1 deletions

View file

@ -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

View file

@ -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)