From 80e3e6ac782b6b3420d421cb1e3f6f434f23e48a Mon Sep 17 00:00:00 2001 From: Rhys Arkins <rhys@arkins.net> Date: Fri, 21 May 2021 13:30:05 +0200 Subject: [PATCH] fix: ensure newline before </details> when truncating --- lib/platform/utils/__snapshots__/pr-body.spec.ts.snap | 4 +++- lib/platform/utils/pr-body.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/platform/utils/__snapshots__/pr-body.spec.ts.snap b/lib/platform/utils/__snapshots__/pr-body.spec.ts.snap index 9790e8f4e6..55a2a7a99c 100644 --- a/lib/platform/utils/__snapshots__/pr-body.spec.ts.snap +++ b/lib/platform/utils/__snapshots__/pr-body.spec.ts.snap @@ -35,7 +35,9 @@ exports[`platform/utils/pr-body .smartTruncate truncates to 1000 1`] = ` ##### Features -- **docker:** AWS ECR authentication support ([#​4497](https:</details> +- **docker:** AWS ECR authentication support ([#​4497](https:// + +</details> --- diff --git a/lib/platform/utils/pr-body.ts b/lib/platform/utils/pr-body.ts index 8f7b0fda40..371452e4bd 100644 --- a/lib/platform/utils/pr-body.ts +++ b/lib/platform/utils/pr-body.ts @@ -6,7 +6,7 @@ export function smartTruncate(input: string, len: number): string { } const releaseNotesMatch = re.exec(input); if (releaseNotesMatch) { - const divider = `</details>\n\n---\n\n### Configuration`; + const divider = `\n\n</details>\n\n---\n\n### Configuration`; const [releaseNotes] = releaseNotesMatch; const nonReleaseNotesLength = input.length - releaseNotes.length - divider.length; -- GitLab