@@ -77,7 +77,7 @@ export def get-release-notes []: record -> record {
7777 # Add PR title as default heading for multi-line summaries
7878 if $lines > 1 and not ($notes starts-with " ###" ) {
7979 $pr = $pr | add-notice info " multi-line summaries with no explicit title (using PR title as heading title)"
80- $notes = " ### " + ($pr.title | clean-title ) ++ (char nl ) ++ $notes
80+ $notes = " ### " + ($pr.title | clean-title ) ++ (char nl ) ++ ( char nl ) ++ $notes
8181 }
8282
8383 # Check for suspiciously short release notes section
@@ -145,18 +145,24 @@ export def generate-section []: record<section: string, prs: table> -> string {
145145 let bullet = $prs | where ($it.notes | lines | length ) == 1
146146
147147 # Add header
148- $body ++= [$" ## ($section.h2 )" ]
148+ $body ++= [$" ## ($section.h2 )\n " ]
149149
150150 # Add multi-line summaries
151- $body ++= $multiline.notes
151+ for note in $multiline.notes {
152+ if ($note | str ends-with " \n " ) {
153+ $body ++= [$note ]
154+ } else {
155+ $body ++= [($note ++ (char nl ))]
156+ }
157+ }
152158
153159 # Add single-line summaries
154160 if ($multiline | is-not-empty ) {
155- $body ++= [$" ### ($section.h3 )" ]
161+ $body ++= [$" ### ($section.h3 )\n " ]
156162 }
157163 $body ++= $bullet | each {|pr | " * " ++ $pr.notes ++ $" \( ($pr | pr-link )\) " }
158164
159- $body | str join (char nl )
165+ ( $body | str join ( char nl )) ++ (char nl )
160166}
161167
162168# Generate the "Hall of Fame" section of the release notes.
0 commit comments