mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-22 21:07:59 +01:00
Fix commands.js
This commit is contained in:
@@ -113,3 +113,11 @@ ${DOC_FILES}: %.html: %.txt $(BASE)/Makefile.common locale/en-US/asciidoc.conf
|
||||
@echo "DOC $@"
|
||||
${ASCIIDOC} --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $<
|
||||
|
||||
T2T = $(wildcard locale/*/*.t2t)
|
||||
t2t: $(T2T:%.t2t=%.xhtml)
|
||||
$(T2T:%.t2t=%.xhtml): locale/en-US/config.t2t
|
||||
|
||||
%.xhtml: %.t2t
|
||||
@echo "T2T $@"
|
||||
txt2tags --quiet $<
|
||||
|
||||
|
||||
@@ -78,12 +78,6 @@ function Command(specs, description, action, extraInfo) //{{{
|
||||
return { names: names, longNames: longNames, shortNames: shortNames };
|
||||
};
|
||||
|
||||
// return the primary command name (the long name of the first spec listed)
|
||||
/** @property {string} The command's cannonical name. */
|
||||
this.name = this.longNames[0];
|
||||
/** @property {string[]} All of this command's long and short names. */
|
||||
this.names = expandedSpecs.names; // return all command name aliases
|
||||
|
||||
let expandedSpecs = parseSpecs(specs);
|
||||
/** @property {string[]} All of this command's name spacs. e.g., "com[mand]" */
|
||||
this.specs = specs;
|
||||
@@ -92,6 +86,11 @@ function Command(specs, description, action, extraInfo) //{{{
|
||||
/** @property {string[]} All of this command's long names, e.g., "command" */
|
||||
this.longNames = expandedSpecs.longNames;
|
||||
|
||||
/** @property {string} The command's cannonical name. */
|
||||
this.name = this.longNames[0];
|
||||
/** @property {string[]} All of this command's long and short names. */
|
||||
this.names = expandedSpecs.names; // return all command name aliases
|
||||
|
||||
/** @property {string} This command's description, as shown in :exinfo */
|
||||
this.description = description || "";
|
||||
/** @property {function (Args)} The function called to execute this command. */
|
||||
|
||||
@@ -503,6 +503,7 @@ function Hints() //{{{
|
||||
return true;
|
||||
|
||||
let words = tokenize(linkText, wordSplitRegex);
|
||||
liberator.dump(words);
|
||||
if (hintStrings.length == 1)
|
||||
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
||||
else
|
||||
@@ -510,8 +511,7 @@ function Hints() //{{{
|
||||
};
|
||||
} //}}}
|
||||
|
||||
let hintMatching = options["hintmatching"];
|
||||
switch (hintMatching)
|
||||
switch (options["hintmatching"])
|
||||
{
|
||||
case "contains" : return containsMatcher(hintString);
|
||||
case "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true);
|
||||
|
||||
Reference in New Issue
Block a user