INNER CODE UNIT · TypeScript

re

baizunxian/zerorunner · frontend/src/components/monaco/nls/index.ts:116

    const re = /(?:monaco-editor[\\\/]esm[\\\/])(.+)(?=\.js)/;
    if (re.exec(filepath)) {
        let path = RegExp.$1;
        path=path.replaceAll('\\','/')

        // if (filepath.includes('contextmenu')) {
        //     console.log(filepath);
        //     console.log(JSON.parse(CURRENT_LOCALE_DATA)[path]);
        // }

        // console.log(path, JSON.parse(CURRENT_LOCALE_DATA)[path]);

        code = code.replace(/localize\(/g, `localize('${path}', `);
    }
    return code;
}

/**

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…