mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 20:37:58 +01:00
use a regexp literal for matching the leader token in :map
This commit is contained in:
@@ -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))
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user