1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-22 22:37:58 +01:00

use a regexp literal for matching the leader token in :map

This commit is contained in:
Doug Kearns
2007-10-22 05:32:22 +00:00
parent 3d71efbdc1
commit e900bcd334

View File

@@ -1109,7 +1109,7 @@ vimperator.Commands = function() //{{{
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/) var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/)
var [lhs, rhs] = [matches[1], matches[2]]; var [lhs, rhs] = [matches[1], matches[2]];
var leader_reg = new RegExp('<Leader>', 'i'); var leader_reg = /<Leader>/i;
if (leader_reg.test(lhs)) if (leader_reg.test(lhs))
{ {