1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-23 23:42:27 +01:00

simplify parseSpecs longname/shortname pattern

This commit is contained in:
Doug Kearns
2008-11-01 05:39:48 +00:00
parent 9bb726f7f8
commit bf5c630575

View File

@@ -42,6 +42,7 @@ function Command(specs, description, action, extraInfo) //{{{
function parseSpecs(specs)
{
// Whoever wrote the following should be ashamed. :(
// Good grief! I have no words... -- djk ;-)
// let shortNames = longNames = names = [];
let names = [];
let longNames = [];
@@ -49,7 +50,7 @@ function Command(specs, description, action, extraInfo) //{{{
for (let [,spec] in Iterator(specs))
{
let matches = spec.match(/(\w+|!)\[(\w+)\]/);
let matches = spec.match(/(\w+)\[(\w+)\]/);
if (matches)
{