File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 1212from rich import print
1313from rich .syntax import Syntax
1414
15+
1516MD_ENTRY = re .compile (
1617 r"""
17- \#\#\ Suggested\ changelog\ entry: # Match the heading exactly
18- (?:\s*<!--.*?-->)? \s* # Optionally match one HTML comment, allowing surrounding whitespace
19- (?P<content>.*?) # Lazily capture everything after (non-greedy)
20- \s*\Z # Allow and trim trailing whitespace until end of string
18+ \#\#\ Suggested\ changelog\ entry: # Match the heading exactly
19+ (?:\s*<!--.*?-->)? # Optionally match one comment
20+ (?P<content>.*?) # Lazily capture content until...
21+ (?= # Lookahead for one of the following:
22+ ^-{3,}\s*$ # A line with 3 or more dashes
23+ | ^<!--\s*readthedocs # A comment starting with 'readthedocs'
24+ | ^\#\# # A new heading
25+ | \Z # End of string
26+ )
2127 """ ,
22- re .DOTALL | re .VERBOSE ,
28+ re .DOTALL | re .VERBOSE | re . MULTILINE ,
2329)
2430print ()
2531
5965 missing .append (issue )
6066 continue
6167
62- msg = changelog .group ("content" )
68+ msg = changelog .group ("content" ). strip ()
6369 if msg .startswith ("- " ):
6470 msg = msg [2 :]
6571 if not msg .startswith ("* " ):
You can’t perform that action at this time.
0 commit comments