Skip to content

Commit

Permalink
[ACS-5400] string escaping fix
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-web-ua committed Jun 29, 2023
1 parent 25073c0 commit 29d3e71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cli/scripts/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function getCommits(options: DiffOptions): Array<Commit> {
let log = shell.exec(command, { cwd: options.dir, silent: true }).toString();

// https://stackoverflow.com/a/13928240/14644447
log = log.trim().replace(/"/gm, '\\"').replace(/\^@\^/gm, '"');
log = JSON.stringify(log.trim()).slice(1, -1).replace(/\^@\^/gm, '"');
if (log.endsWith(',')) {
log = log.substring(0, log.length - 1);
}
Expand Down

0 comments on commit 29d3e71

Please sign in to comment.