1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-20 11:18:00 +01:00

Fix command spec parsing.

"!" is a valid command name.

--HG--
extra : rebase_source : 3c99e0524fb81b84ebcf1546026fcb102ec9c6c7
This commit is contained in:
Doug Kearns
2009-11-17 20:45:09 +11:00
parent 73299bc6d2
commit c22e7d38d0

View File

@@ -224,7 +224,7 @@ const Command = Class("Command", {
*/ */
parseSpecs: function parseSpecs(specs) { parseSpecs: function parseSpecs(specs) {
return specs.map(function (spec) { return specs.map(function (spec) {
let [, head, tail] = spec.match(/(\w+)(?:\[(.*)])?/); let [, head, tail] = spec.match(/([^[]+)(?:\[(.*)])?/);
return tail ? [head + tail, head] : [head]; return tail ? [head + tail, head] : [head];
}); });
} }