X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=common%2Fmodules%2Ftemplate.jsm;h=6e18dc506c676e085153eebcfb9f338d1dfe68be;hb=70740024f9c028c1fd63e1a1850ab062ff956054;hp=8a398c2e148c1fab6e153a2a2eaf0320c316443b;hpb=718c614c183350706466e22939d0101ca4c87efe;p=dactyl.git diff --git a/common/modules/template.jsm b/common/modules/template.jsm index 8a398c2..6e18dc5 100644 --- a/common/modules/template.jsm +++ b/common/modules/template.jsm @@ -119,7 +119,7 @@ var Template = Module("Template", { "click": function onClick(event) { event.preventDefault(); if (this.commandAllowed) { - if (set.has(this.target.commands || {}, this.command)) + if (Set.has(this.target.commands || {}, this.command)) this.target.commands[this.command].call(this.target); else this.target.command(this.command); @@ -128,7 +128,7 @@ var Template = Module("Template", { }, get commandAllowed() { - if (set.has(this.target.allowedCommands || {}, this.command)) + if (Set.has(this.target.allowedCommands || {}, this.command)) return this.target.allowedCommands[this.command]; if ("commandAllowed" in this.target) return this.target.commandAllowed(this.command); @@ -197,7 +197,7 @@ var Template = Module("Template", { - from pushing the baseline down and enlarging - the row. --> -
  • {text} 
  • +
  • {text} 
  • {desc} 
  • ; // @@ -213,7 +213,7 @@ var Template = Module("Template", { else if (/^n_/.test(topic)) topic = topic.slice(2); - if (services["dactyl:"].initialized && !set.has(services["dactyl:"].HELP_TAGS, topic)) + if (services["dactyl:"].initialized && !Set.has(services["dactyl:"].HELP_TAGS, topic)) return {text || token}; XML.ignoreWhitespace = false; XML.prettyPrinting = false; @@ -233,7 +233,7 @@ var Template = Module("Template", { else if (/^n_/.test(topic)) topic = topic.slice(2); - if (services["dactyl:"].initialized && !set.has(services["dactyl:"].HELP_TAGS, topic)) + if (services["dactyl:"].initialized && !Set.has(services["dactyl:"].HELP_TAGS, topic)) return <>{token}; XML.ignoreWhitespace = false; XML.prettyPrinting = false; @@ -247,7 +247,7 @@ var Template = Module("Template", { linkifyHelp: function linkifyHelp(str, help) { let re = util.regexp( [/\s]|^) - (?P '[\w-]+' | :(?:[\w-]+!?|!) | (?:._)?<[\w-]+>\w* | [a-zA-Z]_\w+ | \[[\w-]+\] | E\d{3} ) + (?P '[\w-]+' | :(?:[\w-]+!?|!) | (?:._)?<[\w-]+>\w* | \b[a-zA-Z]_(?:\w+|.) | \[[\w-]+\] | E\d{3} ) (?= [[\)!,:;./\s]|$) ]]>, "gx"); return this.highlightSubstrings(str, (function () { @@ -349,7 +349,7 @@ var Template = Module("Template", { highlightURL: function highlightURL(str, force) { if (force || /^[a-zA-Z]+:\/\//.test(str)) - return {str}; + return {util.losslessDecodeURI(str)}; else return str; }, @@ -363,7 +363,9 @@ var Template = Module("Template", { // return - + + + { this.map(Iterator(elems), function ([idx, val]) @@ -371,7 +373,7 @@ var Template = Module("Template", { - + ) }
    jumptitleURI{_("title.Jump")}{_("title.Title")}{_("title.URI")}
    {idx == index ? ">" : ""} {Math.abs(idx - index)} {val.title}{val.URI.spec}{util.losslessDecodeURI(val.URI.spec)}
    ; @@ -494,7 +496,7 @@ var Template = Module("Template", { let (name = item.name || item.names[0], frame = item.definedAt) !frame ? name : template.helpLink(help(item), name, "Title") + - Defined at {sourceLink(frame)} + {_("io.definedAt")} {sourceLink(frame)} } { item.columns ? template.map(item.columns, function (c) {c}) : "" }