@redpanda-data/docs-extensions-and-macros 5.22.3 → 5.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1192,7 +1192,12 @@ function updateWhatsNewFile(diffData, whatsNewPath, version, options = {}) {
|
|
|
1192
1192
|
const nextHeading = rest.search(/\n== /)
|
|
1193
1193
|
const insertAt = nextHeading === -1 ? existingContent.length : sectionStart + nextHeading
|
|
1194
1194
|
const before = existingContent.slice(0, insertAt).replace(/\s*$/, '\n\n')
|
|
1195
|
-
|
|
1195
|
+
// A single newline here leaves the appended block's end marker comment
|
|
1196
|
+
// directly above the next `== ` heading with no blank line between them.
|
|
1197
|
+
// AsciiDoc comments don't terminate the preceding list block, so the
|
|
1198
|
+
// heading is swallowed as literal list-item text instead of rendering
|
|
1199
|
+
// as a heading. Needs the same blank-line separator as `before`.
|
|
1200
|
+
const after = existingContent.slice(insertAt).replace(/^\n*/, '\n\n')
|
|
1196
1201
|
fs.writeFileSync(whatsNewPath, `${before}${block}${after}`, 'utf8')
|
|
1197
1202
|
console.log(`Appended ${version} block to the "${sectionHeading}" section in: ${whatsNewPath}`)
|
|
1198
1203
|
return
|