mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 17:47:59 +01:00
Hackier but more reliable literal() stuff.
This commit is contained in:
@@ -1239,14 +1239,14 @@ var Commands = Module("commands", {
|
||||
}
|
||||
},
|
||||
|
||||
nameRegexp: util.regexp(literal(/*
|
||||
nameRegexp: util.regexp(literal(function () /*
|
||||
[^
|
||||
0-9
|
||||
<forbid>
|
||||
]
|
||||
[^ <forbid> ]*
|
||||
*/), "gx", {
|
||||
forbid: util.regexp(String.replace(literal(/*
|
||||
*/$), "gx", {
|
||||
forbid: util.regexp(String.replace(literal(function () /*
|
||||
U0000-U002c // U002d -
|
||||
U002e-U002f
|
||||
U003a-U0040 // U0041-U005a a-z
|
||||
@@ -1269,12 +1269,12 @@ var Commands = Module("commands", {
|
||||
Ufe70-Ufeff // Arabic Presentation Forms-B
|
||||
Uff00-Uffef // Halfwidth and Fullwidth Forms
|
||||
Ufff0-Uffff // Specials
|
||||
*/), /U/g, "\\u"), "x")
|
||||
*/$), /U/g, "\\u"), "x")
|
||||
}),
|
||||
|
||||
validName: Class.Memoize(function validName() util.regexp("^" + this.nameRegexp.source + "$")),
|
||||
|
||||
commandRegexp: Class.Memoize(function commandRegexp() util.regexp(literal(/*
|
||||
commandRegexp: Class.Memoize(function commandRegexp() util.regexp(literal(function () /*
|
||||
^
|
||||
(?P<spec>
|
||||
(?P<prespace> [:\s]*)
|
||||
@@ -1289,7 +1289,7 @@ var Commands = Module("commands", {
|
||||
(?:. | \n)*?
|
||||
)?
|
||||
$
|
||||
*/), "x", {
|
||||
*/$), "x", {
|
||||
name: this.nameRegexp
|
||||
})),
|
||||
|
||||
|
||||
Reference in New Issue
Block a user