mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-19 18:45:46 +01:00
Fix Xulmus, etc.
--HG-- branch : xslt
This commit is contained in:
@@ -702,7 +702,6 @@ function Bookmarks() //{{{
|
||||
// if the search also requires a postData, [url, postData] is returned
|
||||
getSearchURL: function getSearchURL(text, useDefsearch)
|
||||
{
|
||||
let url = null;
|
||||
let searchString = (useDefsearch ? options["defsearch"] + " " : "") + text;
|
||||
|
||||
// we need to make sure our custom alias have been set, even if the user
|
||||
|
||||
@@ -1193,7 +1193,7 @@ function Commands() //{{{
|
||||
let [, prefix, junk] = context.filter.match(/^(:*\d*)\w*(.?)/) || [];
|
||||
context.advance(prefix.length);
|
||||
if (!junk)
|
||||
return context.fork("", 0, this, "command");
|
||||
return void context.fork("", 0, this, "command");
|
||||
|
||||
// dynamically get completions as specified with the command's completer function
|
||||
let command = commands.get(cmd);
|
||||
|
||||
@@ -185,6 +185,7 @@ function CompletionContext(editor, name, offset) //{{{
|
||||
this.getKey = function (item, key) (typeof self.keys[key] == "function") ? self.keys[key].call(this, item.item) :
|
||||
key in self.keys ? item.item[self.keys[key]]
|
||||
: item.item[key];
|
||||
return this;
|
||||
}
|
||||
|
||||
CompletionContext.Sort = {
|
||||
@@ -453,13 +454,13 @@ CompletionContext.prototype = {
|
||||
let filter = fixCase(this.filter);
|
||||
if (this.anchored)
|
||||
{
|
||||
function compare(text, s) text.substr(0, s.length) == s;
|
||||
var compare = function compare(text, s) text.substr(0, s.length) == s;
|
||||
substrings = util.map(util.range(filter.length, text.length + 1),
|
||||
function (end) text.substring(0, end));
|
||||
}
|
||||
else
|
||||
{
|
||||
function compare(text, s) text.indexOf(s) >= 0;
|
||||
var compare = function compare(text, s) text.indexOf(s) >= 0;
|
||||
substrings = [];
|
||||
let start = 0;
|
||||
let idx;
|
||||
@@ -1156,12 +1157,12 @@ function Completion() //{{{
|
||||
// Yes. If the [ starts at the beginning of a logical
|
||||
// statement, we're in an array literal, and we're done.
|
||||
if (get(-3, 0, STATEMENTS) == get(-2)[OFFSET])
|
||||
return;
|
||||
return null;
|
||||
|
||||
// Beginning of the statement upto the opening [
|
||||
let obj = getObj(-3, get(-2)[OFFSET]);
|
||||
|
||||
return complete.call(this, obj, getKey(), null, string, last);
|
||||
return void complete.call(this, obj, getKey(), null, string, last);
|
||||
}
|
||||
|
||||
// Is this a function call?
|
||||
@@ -1211,7 +1212,7 @@ function Completion() //{{{
|
||||
};
|
||||
|
||||
obj[0][1] += "." + func + "(... [" + args.length + "]";
|
||||
return complete.call(this, obj, key, compl, string, last);
|
||||
return void complete.call(this, obj, key, compl, string, last);
|
||||
}
|
||||
|
||||
// In a string that's not an obj key or a function arg.
|
||||
@@ -1246,7 +1247,7 @@ function Completion() //{{{
|
||||
{ // FIXME
|
||||
var o = top[OFFSET];
|
||||
top[OFFSET] = offset;
|
||||
return complete.call(this, obj, key);
|
||||
return void complete.call(this, obj, key);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
@@ -178,10 +178,7 @@ function Editor() //{{{
|
||||
{
|
||||
let matches = args.string.match(RegExp("^\\s*($|" + abbrevmatch + ")(?:\\s*$|\\s+(.*))"));
|
||||
if (!matches)
|
||||
{
|
||||
liberator.echoerr("E474: Invalid argument");
|
||||
return false;
|
||||
}
|
||||
return void liberator.echoerr("E474: Invalid argument");
|
||||
let [, lhs, rhs] = matches;
|
||||
if (rhs)
|
||||
editor.addAbbreviation(mode, lhs, rhs);
|
||||
|
||||
@@ -31,11 +31,11 @@
|
||||
</html:html>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:include">
|
||||
<xsl:template match="liberator:include" mode="pass-2">
|
||||
<xsl:apply-templates select="document(@href)/liberator:document/node()"/>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:dl">
|
||||
<xsl:template match="liberator:dl" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<column/>
|
||||
<column/>
|
||||
@@ -48,7 +48,7 @@
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:tags">
|
||||
<xsl:template match="liberator:tags" mode="pass-2">
|
||||
<xsl:call-template name="parse-tags">
|
||||
<xsl:with-param name="text" select="."/>
|
||||
</xsl:call-template>
|
||||
@@ -63,7 +63,7 @@
|
||||
</tags>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:default[not(@type='plain')]">
|
||||
<xsl:template match="liberator:default[not(@type='plain')]" mode="pass-2">
|
||||
<xsl:variable name="type" select="preceding-sibling::liberator:type[1] | following-sibling::liberator:type[1]"/>
|
||||
<xsl:copy>
|
||||
<xsl:choose>
|
||||
@@ -103,28 +103,28 @@
|
||||
<xsl:value-of select="$contents"/>
|
||||
</html:a>
|
||||
</xsl:template>
|
||||
<xsl:template match="liberator:o">
|
||||
<xsl:template match="liberator:o" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<xsl:call-template name="linkify-tag">
|
||||
<xsl:with-param name="contents" select='concat("'", text(), "'")'/>
|
||||
</xsl:call-template>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="liberator:k|liberator:t">
|
||||
<xsl:template match="liberator:k|liberator:t" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<xsl:call-template name="linkify-tag">
|
||||
<xsl:with-param name="contents" select="text()"/>
|
||||
</xsl:call-template>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="liberator:k[@name]">
|
||||
<xsl:template match="liberator:k[@name]" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<xsl:call-template name="linkify-tag">
|
||||
<xsl:with-param name="contents" select="concat('<', @name, '>', .)"/>
|
||||
</xsl:call-template>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="liberator:ex">
|
||||
<xsl:template match="liberator:ex" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<xsl:call-template name="linkify-tag">
|
||||
<xsl:with-param name="contents" select="."/>
|
||||
@@ -132,11 +132,11 @@
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:link">
|
||||
<xsl:template match="liberator:link" mode="pass-2">
|
||||
<html:a href="{@topic}"><xsl:apply-templates select="@*|node()"/></html:a>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="liberator:tag|@tag">
|
||||
<xsl:template match="liberator:tag|@tag" mode="pass-2">
|
||||
<xsl:call-template name="parse-tags">
|
||||
<xsl:with-param name="text"><xsl:value-of select="."/></xsl:with-param>
|
||||
</xsl:call-template>
|
||||
@@ -151,12 +151,12 @@
|
||||
<xsl:choose>
|
||||
<xsl:when test="$localdoc/*[@replace=$tag] and not($elem[@replace])">
|
||||
<xsl:for-each select="$localdoc/*[@replace=$tag]">
|
||||
<xsl:apply-templates select="."/>
|
||||
<xsl:apply-templates select="." mode="pass-2"/>
|
||||
</xsl:for-each>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:for-each select="$elem">
|
||||
<xsl:copy><xsl:apply-templates select="node()"/></xsl:copy>
|
||||
<xsl:apply-templates select="." mode="pass-2"/>
|
||||
</xsl:for-each>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
@@ -184,11 +184,14 @@
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:template match="@*|node()" mode="pass-2">
|
||||
<xsl:copy>
|
||||
<xsl:apply-templates select="@*|node()"/>
|
||||
</xsl:copy>
|
||||
</xsl:template>
|
||||
<xsl:template match="@*|node()">
|
||||
<xsl:apply-templates select="." mode="pass-2"/>
|
||||
</xsl:template>
|
||||
</xsl:stylesheet>
|
||||
|
||||
<!-- vim:se ft=xslt sts=4 sw=4 et: -->
|
||||
|
||||
@@ -215,7 +215,7 @@ const liberator = (function () //{{{
|
||||
|
||||
options.add(["helpfile", "hf"],
|
||||
"Name of the main help file",
|
||||
"string", "intro");
|
||||
"string", "intro.html");
|
||||
|
||||
options.add(["loadplugins", "lpl"],
|
||||
"Load plugin scripts when starting up",
|
||||
@@ -1389,7 +1389,7 @@ const liberator = (function () //{{{
|
||||
{
|
||||
let helpFile = options["helpfile"];
|
||||
if (config.helpFiles.indexOf(helpFile) != -1)
|
||||
liberator.open("liberator://help/" + helpFile, { from: "help" });
|
||||
liberator.open("liberator://help/" + helpFile.replace(/\.html$/, ""), { from: "help" });
|
||||
else
|
||||
liberator.echomsg("Sorry, help file " + helpFile.quote() + " not found");
|
||||
return;
|
||||
|
||||
@@ -176,11 +176,10 @@ Highlights.prototype.CSS = <![CDATA[
|
||||
|
||||
HelpTab,liberator|dl display: table; width: 100%; margin: 1em 0; border-bottom-width: 1px; border-top-width: 1px; padding: .5ex 0; table-layout: fixed;
|
||||
HelpTabColumn,liberator|column display: table-column;
|
||||
HelpTabColumn1,liberator|column:nth-of-type(1) display: table-column; width: 25%;
|
||||
HelpTabColumn2,liberator|column:nth-of-type(2) display: table-column; width: 75%;
|
||||
HelpTabColumn:first-child width: 25%;
|
||||
HelpTabTitle,liberator|dt display: table-cell; padding: .1ex 1ex; font-weight: bold;
|
||||
HelpTabDescription,liberator|dd display: table-cell; padding: .1ex 1ex;
|
||||
HelpTabRow,liberator|dl>* display: table-row;
|
||||
HelpTabRow,liberator|dl>tr display: table-row;
|
||||
|
||||
HelpTag,liberator|tag display: inline-block; color: #527BBD; margin-left: 1ex; font-size: 8pt; font-weight: bold;
|
||||
HelpTags,liberator|tags display: block; float: right; clear: right;
|
||||
@@ -277,7 +276,7 @@ function Highlights(name, store)
|
||||
this.selector = function (class)
|
||||
{
|
||||
let [, hl, rest] = class.match(/^(\w*)(.*)/);
|
||||
let class = "[liberator|highlight~=" + hl + "]"
|
||||
class = "[liberator|highlight~=" + hl + "]"
|
||||
if (highlight[hl] && highlight[hl].class != class)
|
||||
class = highlight[hl].selector;
|
||||
return class + rest;
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<dl tag="autocommand-list"/>
|
||||
|
||||
<p><a>pat</a> is a regular expression, use .* if you want to match all URLs.</p>
|
||||
<p><a>pat</a> is a regular expression, use <tt>.*</tt> if you want to match all URLs.</p>
|
||||
|
||||
<note>This differs from Vim which uses a glob rather than a regex for <a>pat</a>.</note>
|
||||
|
||||
@@ -78,27 +78,20 @@
|
||||
|
||||
<p>Enable <em>passthrough</em> mode on all Google sites:</p>
|
||||
|
||||
<p>
|
||||
<ex>:autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL)</ex>
|
||||
</p>
|
||||
<code><ex>:autocmd LocationChange .* js modes.passAllKeys = /google\.com/.test(buffer.URL)</ex></code>
|
||||
|
||||
<p>Enable <em>passthrough</em> mode on *some* Google sites:</p>
|
||||
<p>Enable <em>passthrough</em> mode on <em>some</em> Google sites:</p>
|
||||
|
||||
<p>
|
||||
<ex>:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL)</ex>
|
||||
</p>
|
||||
<code><ex>:autocmd LocationChange .* js modes.passAllKeys = /(www|mail)\.google\.com/.test(buffer.URL)</ex></code>
|
||||
|
||||
<p>
|
||||
Set the filetype to mail when editing email at Gmail:
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<code>
|
||||
<ex>:autocmd LocationChange .* :set editor=<str>gvim -f</str></ex>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<ex>:autocmd LocationChange mail\\.google\\.com :set editor=<str>gvim -f -c 'set ft=mail'</str></ex>
|
||||
</p>
|
||||
</code>
|
||||
|
||||
</document>
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@
|
||||
<spec>:delbm[arks]!</spec>
|
||||
<description>
|
||||
<p>
|
||||
Delete a bookmark. Deletes *all* bookmarks which match the <oa>url</oa>. If
|
||||
Delete a bookmark. Deletes <em>all</em> bookmarks which match the <oa>url</oa>. If
|
||||
omitted, <oa>url</oa> defaults to the URL of the current buffer. Use <k name="Tab"/>
|
||||
key on a string to complete the URL which you want to delete.
|
||||
</p>
|
||||
|
||||
@@ -100,7 +100,7 @@
|
||||
<li>
|
||||
All directories in <o>runtimepath</o> are searched for a
|
||||
"plugin" subdirectory and all yet unloaded plugins are loaded.
|
||||
For each plugin directory, all *.{js,vimp} files (including
|
||||
For each plugin directory, all <tt>*.{js,vimp}</tt> files (including
|
||||
those in further subdirectories) are sourced alphabetically. No
|
||||
plugins will be sourced if:
|
||||
|
||||
@@ -117,10 +117,15 @@
|
||||
|
||||
The user's ~ (i.e., "home") directory is determined as follows:
|
||||
|
||||
* On Unix and Mac, the environment variable <em>$HOME</em> is used.
|
||||
* On Windows, &liberator.appname; checks for the existence of <em>%HOME%</em>, then
|
||||
<em>%USERPROFILE%</em>, and then <em>%HOMEDRIVE%%HOMEPATH%</em>. It uses the first one
|
||||
it finds.
|
||||
<ul>
|
||||
<li>On Unix and Mac, the environment variable <em>$HOME</em> is used.</li>
|
||||
<li>
|
||||
On Windows, &liberator.appname; checks for the existence of
|
||||
<em>%HOME%</em>, then <em>%USERPROFILE%</em>, and then
|
||||
<em>%HOMEDRIVE%%HOMEPATH%</em>. It uses the first one it
|
||||
finds.
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<h2 tag="save-settings">Saving settings</h2>
|
||||
|
||||
|
||||
@@ -142,9 +142,9 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If <a>name</a> (short option: *-n*) is provided, any existing style with the same
|
||||
If <a>name</a> (short option: <em>-n</em>) is provided, any existing style with the same
|
||||
name is overridden, and the style may later be deleted using <a>name</a>. If
|
||||
*-append* (short option: *-a*) is provided along with *-name*, <a>css</a> and
|
||||
<em>-append</em> (short option: <em>-a</em>) is provided along with <em>-name</em>, <a>css</a> and
|
||||
<a>filter</a> are appended to its current value.
|
||||
</p>
|
||||
|
||||
@@ -165,9 +165,9 @@
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li><em>-name</em>: The name provided to <ex>:style</ex> (short option: *-n*)</li>
|
||||
<li><em>-name</em>: The name provided to <ex>:style</ex> (short option: <em>-n</em>)</li>
|
||||
<li><em>-index</em>: For unnamed styles, the index listed by <ex>:style</ex>
|
||||
(short option: *-i*)</li>
|
||||
(short option: <em>-i</em>)</li>
|
||||
</ul>
|
||||
</description>
|
||||
</item>
|
||||
|
||||
Reference in New Issue
Block a user