فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

fix(ui): parse inline view handlers with correct JavaScript regex escapes

davoodmehraban89 committed Oct 30, 2026 at 23:17 UTC 6207944d09482365f02fadcfb8b9bee3f84c8ab6
1 file changed +2 -2
tests/ui-control-structure.test.mjs
+2 -2
@@ -18,10 +18,10 @@ test('Q01: every named inline view handler has an actual declared view method',
18 for (const [sourceName, source] of views) {
19 // Find only declarations in the HTML/template markup, not arbitrary test
20 // or controller calls that do not become user-facing controls.
21 - const actions = [...source.matchAll(/on(?:click|change|input|submit|mousedown|blur|focus|keyup|keydown)\\?=["']([^"']+)["']/g)];
21 + const actions = [...source.matchAll(/on(?:click|change|input|submit|mousedown|blur|focus|keyup|keydown)\s*=\s*["']([^"']+)["']/g)];
22 for (const action of actions) {
23 const handler = action[1].replace(/\\(["'])/g, '$1');
24 - for (const call of handler.matchAll(/(?:window\\.)?([A-Za-z_$][\\w$]*(?:View|Modal))\\.([A-Za-z_$][\\w$]*)\\s*\\(/g)) {
24 + for (const call of handler.matchAll(/(?:window\.)?([A-Za-z_$][\w$]*(?:View|Modal))\.([A-Za-z_$][\w$]*)\s*\(/g)) {
25 const viewName = call[1], method = call[2];
26 refs.push({sourceName, viewName, method});
27 const src = views.get(viewName);