Skip to content

Commit fb6ead0

Browse files
committed
fix balloon template render
1 parent 69a0ddc commit fb6ead0

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

packages/server/client/balloon.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,11 @@ export const receiptBalloonText = (
5656
.replace(/%TEAM/g, i18n[lang].team)
5757
.replace(/%STATUS/g, i18n[lang].status)
5858
.replace(/%RECEIPT/g, i18n[lang].receipt);
59-
for (const line of config.balloonTemplate.split('\n')) {
60-
if (!line.startsWith('#')) enc = enc.line(replace(line));
59+
for (const line of config.balloonTemplate.replace(/\r/g, '').split('\n')) {
60+
if (!line.startsWith('#')) {
61+
enc = enc.line(replace(line));
62+
continue;
63+
}
6164
const [command, ...rawArgs] = line.slice(1).split(' ');
6265
const args = rawArgs.map((arg) => (arg === 'true' ? true : arg === 'false' ? false : Number.isSafeInteger(arg) ? +arg : replace(arg)));
6366
if (whitelist.includes(command)) enc = enc[command](...args);

0 commit comments

Comments
 (0)