Skip to content

Commit 0a53a93

Browse files
committed
Fix release formatting for new versions of pandoc
Ubuntu version in GitHub Actions has recently been upgraded to 24.04: actions/runner-images#10636) This meant that pandoc was upgraded and it changed the way markdown is formatted by default.
1 parent 5fc92c9 commit 0a53a93

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

extra/release.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ def make_ref_link(ref_id: str, name: str | None = None) -> str:
135135

136136

137137
MD_REPLACEMENTS: list[Replacement] = [
138-
(r"^ (- )", r"\1"), # remove indent from top-level bullet points
139-
(r"^ +( - )", r"\1"), # adjust nested bullet points indent
138+
(r"<span[^>]+>([^<]+)</span>", r"_\1"), # remove a couple of wild span refs
140139
(r"^(\w[^\n]{,80}):(?=\n\n[^ ])", r"### \1"), # format section headers
141140
(r"^(\w[^\n]{81,}):(?=\n\n[^ ])", r"**\1**"), # and bolden too long ones
142141
(r"### [^\n]+\n+(?=### )", ""), # remove empty sections

test/test_release.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def rst_changelog():
7070
def md_changelog():
7171
return r"""### New features
7272
73-
- [Substitute Plugin](https://beets.readthedocs.io/en/stable/plugins/substitute.html): Some substitute multi-line change. :bug: (\#5467)
73+
- [Substitute Plugin](https://beets.readthedocs.io/en/stable/plugins/substitute.html): Some substitute multi-line change. :bug: (#5467)
7474
- [list](https://beets.readthedocs.io/en/stable/reference/cli.html#list-cmd) Update.
7575
7676
You can do something with this command:
@@ -82,9 +82,9 @@ def md_changelog():
8282
- Another fix with its own bullet points using correct indentation:
8383
- First
8484
- Second
85-
- Some fix thanks to @username. :bug: (\#5467)
85+
- Some fix thanks to @username. :bug: (#5467)
8686
- Some fix that mentions user @username.
87-
- Some fix that refers to an issue. :bug: (\#5467)
87+
- Some fix that refers to an issue. :bug: (#5467)
8888
- Some fix with its own bullet points using incorrect indentation:
8989
- First nested bullet point with some text that wraps to the next line
9090
- Second nested bullet point
@@ -93,7 +93,7 @@ def md_changelog():
9393
9494
### Other changes
9595
96-
- 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)
96+
- 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)
9797
9898
# 2.1.0 (November 22, 2024)
9999

0 commit comments

Comments
 (0)