From e7a7093f0d96ac8fd77763718527eee2a4faed40 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Sat, 20 Dec 2008 01:05:10 -0500 Subject: [PATCH] Fix commands.js --- common/Makefile.common | 8 ++++++++ common/content/commands.js | 11 +++++------ common/content/hints.js | 4 ++-- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/common/Makefile.common b/common/Makefile.common index fcb9ebbc..8bb4edaf 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -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 $< + diff --git a/common/content/commands.js b/common/content/commands.js index 356960cc..6e7bd58e 100644 --- a/common/content/commands.js +++ b/common/content/commands.js @@ -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. */ diff --git a/common/content/hints.js b/common/content/hints.js index 27a1dbb5..101d92dc 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -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);