fix: standardize version parsing and simplify string escaping

This commit is contained in:
手瓜一十雪 committed 2026-10-18 13:00:39 +08:00
1 parent 4e2b6b1200
commit 38a7c3da63
23 files changed
+245 -137

No files matched your search

@@ -60,6 +60,12 @@ describe('renderTemplate — mechanical {key} substitution', () => {
it('does NOT escape when template is plain text', () => {
expect(renderTemplate('{val}', { val: 'a"b\\c' })).toBe('a"b\\c');
});
it('preserves control characters as JSON string escapes', () => {
const value = 'line\nnext\r\t\b\f\0"\\';
const rendered = renderTemplate('{"text":"{value}"}', { value });
expect(JSON.parse(rendered)).toEqual({ text: value });
});
});
describe('normalizeNotificationsConfig — total normalize', () => {