mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-23 16:52:25 +01:00
use \S rather than a negated \s character set in patterns
This commit is contained in:
@@ -664,7 +664,7 @@ liberator.Buffer = function () //{{{
|
||||
"Add or list user styles",
|
||||
function (args, special)
|
||||
{
|
||||
let [, filter, css] = args.match(/([^\s]+)\s*((?:.|\n)*)/) || [];
|
||||
let [, filter, css] = args.match(/(\S+)\s*((?:.|\n)*)/) || [];
|
||||
if (!css)
|
||||
{
|
||||
let str = liberator.template.tabular(["", "Filter", "CSS"],
|
||||
|
||||
@@ -103,7 +103,7 @@ liberator.Command.prototype = {
|
||||
}
|
||||
else if (this.hereDoc)
|
||||
{
|
||||
let matches = args.match(/(.*)<<\s*([^\s]+)$/);
|
||||
let matches = args.match(/(.*)<<\s*(\S+)$/);
|
||||
if (matches && matches[2])
|
||||
{
|
||||
liberator.commandline.inputMultiline(new RegExp("^" + matches[2] + "$", "m"),
|
||||
|
||||
@@ -164,7 +164,7 @@ liberator.Editor = function () //{{{
|
||||
return;
|
||||
}
|
||||
|
||||
var matches = args.match(/^([^\s]+)(?:\s+(.+))?$/);
|
||||
var matches = args.match(/^(\S+)(?:\s+(.+))?$/);
|
||||
var [lhs, rhs] = [matches[1], matches[2]];
|
||||
if (rhs)
|
||||
liberator.editor.addAbbreviation(mode, lhs, rhs);
|
||||
|
||||
@@ -824,7 +824,7 @@ lookup:
|
||||
else if (command.name == "javascript")
|
||||
{
|
||||
// check for a heredoc
|
||||
let matches = args.match(/(.*)<<\s*([^\s]+)$/);
|
||||
let matches = args.match(/(.*)<<\s*(\S+)$/);
|
||||
|
||||
if (matches)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user