<commit_before>"use strict";

module.exports = {
    name : 'link_to',
    handler : function (name,option) {
        let route = this._arrRoutes[name];
        if(option) {
            Object.keys(option).map(function (key) {
                let newKey = key;
                if (key[0] !== ":") {
                    newKey = ":" + key;
                }
                route = route.replace(newKey,option[key]);
            });
        }
        return route;
    }
};<commit_msg>fix error function link_to generate route contain regular expression #15<commit_after>"use strict";

module.exports = {
    name : 'link_to',
    handler : function (name,option) {
        let route = this._arrRoutes[name];
        route = route.replace(/\((.)*\)/, '');
        if(option) {
            Object.keys(option).map(function (key) {
                let newKey = key;
                if (key[0] !== ":") {
                    newKey = ":" + key;
                }
                route = route.replace(newKey,option[key]);
            });
        }
        return route;
    }
};
{'fraction_non_alphanumeric': 0.14804469273743018, 'fraction_numerical': 0.0037243947858473, 'mean_word_length': 1.476958525345622, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4769053', 'n_tokens_mistral': 314, 'n_tokens_neox': 302, 'n_words': 61}