mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-07 18:14:11 +01:00
Add {, }, [{arg}, ]{arg}. Closes issue #592.
This commit is contained in:
@@ -247,7 +247,7 @@ var Template = Module("Template", {
|
||||
linkifyHelp: function linkifyHelp(str, help) {
|
||||
let re = util.regexp(<![CDATA[
|
||||
(?P<pre> [/\s]|^)
|
||||
(?P<tag> '[\w-]+' | :(?:[\w-]+!?|!) | (?:._)?<[\w-]+>\w* | [a-zA-Z]_\w+ | \[[\w-]+\] | E\d{3} )
|
||||
(?P<tag> '[\w-]+' | :(?:[\w-]+!?|!) | (?:._)?<[\w-]+>\w* | \b[a-zA-Z]_(?:\w+|.) | \[[\w-]+\] | E\d{3} )
|
||||
(?= [[\)!,:;./\s]|$)
|
||||
]]>, "gx");
|
||||
return this.highlightSubstrings(str, (function () {
|
||||
|
||||
@@ -620,7 +620,8 @@ var Util = Module("Util", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference]),
|
||||
range.selectNode(node);
|
||||
node = range;
|
||||
}
|
||||
let doc = (node.getRangeAt ? node.getRangeAt(0) : node).startContainer.ownerDocument;
|
||||
let doc = (node.getRangeAt ? node.getRangeAt(0) : node).startContainer;
|
||||
doc = doc.ownerDocument || doc;
|
||||
|
||||
let encoder = services.HtmlEncoder();
|
||||
encoder.init(doc, "text/unicode", encoder.OutputRaw|encoder.OutputPreformatted);
|
||||
|
||||
Reference in New Issue
Block a user