fix(aidoc): Fix changelog generation by properly stripping markdown code fences
This commit is contained in:
@ -110,7 +110,7 @@ ${JSON.stringify(commitMessages, null, 2)}
|
||||
|
||||
previousChangelog = await plugins.smartfile.SmartFile.fromString(
|
||||
previousChangelogPath,
|
||||
result2.message.replace('```markdown', '').replace('```', ''),
|
||||
result2.message.replaceAll('```markdown', '').replaceAll('```', ''),
|
||||
'utf8'
|
||||
);
|
||||
}
|
||||
@ -120,8 +120,7 @@ ${JSON.stringify(commitMessages, null, 2)}
|
||||
let newChangelog = `# Changelog\n\n${`## ${newDateString} - {{nextVersion}} - {{nextVersionScope}}
|
||||
{{nextVersionMessage}}
|
||||
|
||||
{{nextVersionDetails}}
|
||||
`}\n\n${oldChangelog}`;
|
||||
{{nextVersionDetails}}`}\n\n${oldChangelog}`;
|
||||
resultObject.changelog = newChangelog;
|
||||
|
||||
return resultObject;
|
||||
|
Reference in New Issue
Block a user