mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 14:52:28 +01:00
simplify parseSpecs longname/shortname pattern
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user