Skip to content

Commit

Permalink
fix: ensure newline before </details> when truncating
Browse files Browse the repository at this point in the history
  • Loading branch information
rarkins committed May 21, 2021
1 parent df987f5 commit 80e3e6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/platform/utils/__snapshots__/pr-body.spec.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,9 @@ exports[`platform/utils/pr-body .smartTruncate truncates to 1000 1`] = `
##### Features
- **docker:** AWS ECR authentication support ([#&#8203;4497](https:</details>
- **docker:** AWS ECR authentication support ([#&#8203;4497](https://
</details>
---
Expand Down
2 changes: 1 addition & 1 deletion lib/platform/utils/pr-body.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 80e3e6a

Please sign in to comment.