[Build] Fix changelog causing error if compiled

pull/48/head
Oj18 3 years ago
parent 28419fd35f
commit ef9fb34aa3

@ -44,6 +44,6 @@ export default () => {
body: body.join('\n')
};
return JSON.stringify(json).replaceAll('`', '\\`').replaceAll(`\\n`, `\\\\n`);
return JSON.stringify(json).replaceAll('`', '\\`').replaceAll(`\\n`, `\\\\n`).replaceAll(`\\"`, `\\\\"`).replaceAll(`"`, `\\"`);
};
// console.log(JSON.stringify(json).replaceAll(`\\"`, `\\\\\\"`).replaceAll(`"`, `\\\\\\"`).replaceAll(`\\n`, `\\\\\\\\n`).replaceAll('/', '\\/'));

@ -38,7 +38,7 @@ export const show = async () => {
};
export const generate = () => {
const changelog = JSON.parse(`<changelog>`);
const changelog = JSON.parse("<changelog>");
version = changelog.version;

Loading…
Cancel
Save