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 $@"
|
@echo "DOC $@"
|
||||||
${ASCIIDOC} --unsafe -a linkcss -a quirks! -a doctitle="$(shell basename $@)" -o $@ $<
|
${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 { 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);
|
let expandedSpecs = parseSpecs(specs);
|
||||||
/** @property {string[]} All of this command's name spacs. e.g., "com[mand]" */
|
/** @property {string[]} All of this command's name spacs. e.g., "com[mand]" */
|
||||||
this.specs = specs;
|
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" */
|
/** @property {string[]} All of this command's long names, e.g., "command" */
|
||||||
this.longNames = expandedSpecs.longNames;
|
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 */
|
/** @property {string} This command's description, as shown in :exinfo */
|
||||||
this.description = description || "";
|
this.description = description || "";
|
||||||
/** @property {function (Args)} The function called to execute this command. */
|
/** @property {function (Args)} The function called to execute this command. */
|
||||||
|
|||||||
@@ -503,6 +503,7 @@ function Hints() //{{{
|
|||||||
return true;
|
return true;
|
||||||
|
|
||||||
let words = tokenize(linkText, wordSplitRegex);
|
let words = tokenize(linkText, wordSplitRegex);
|
||||||
|
liberator.dump(words);
|
||||||
if (hintStrings.length == 1)
|
if (hintStrings.length == 1)
|
||||||
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
return charsAtBeginningOfWords(hintStrings[0], words, allowWordOverleaping);
|
||||||
else
|
else
|
||||||
@@ -510,8 +511,7 @@ function Hints() //{{{
|
|||||||
};
|
};
|
||||||
} //}}}
|
} //}}}
|
||||||
|
|
||||||
let hintMatching = options["hintmatching"];
|
switch (options["hintmatching"])
|
||||||
switch (hintMatching)
|
|
||||||
{
|
{
|
||||||
case "contains" : return containsMatcher(hintString);
|
case "contains" : return containsMatcher(hintString);
|
||||||
case "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true);
|
case "wordstartswith": return wordStartsWithMatcher(hintString, /*allowWordOverleaping=*/ true);
|
||||||
|
|||||||
Reference in New Issue
Block a user