From 3ceecbaf52b40d0dd0cae9cd37c9169645d4a3ad Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Sat, 4 Oct 2008 03:14:04 +0000 Subject: [PATCH] use \S rather than a negated \s character set in patterns --- content/buffer.js | 6 +++--- content/commands.js | 2 +- content/editor.js | 2 +- content/events.js | 2 +- content/io.js | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/content/buffer.js b/content/buffer.js index 5fb98b7e..4fafcb3f 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -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"], @@ -1832,8 +1832,8 @@ liberator.Marks = function () //{{{ let list = liberator.template.tabular(["mark", "line", "col", "file"], ["", "text-align: right", "text-align: right", "color: green"], ([mark[0], - Math.round(mark[1].position.x & 100) + "%", - Math.round(mark[1].position.y & 100) + "%", + Math.round(mark[1].position.x & 100) + "%", + Math.round(mark[1].position.y & 100) + "%", mark[1].location] for each (mark in marks))); liberator.commandline.echo(list, liberator.commandline.HL_NORMAL, liberator.commandline.FORCE_MULTILINE); diff --git a/content/commands.js b/content/commands.js index bb175044..2c859eba 100644 --- a/content/commands.js +++ b/content/commands.js @@ -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"), diff --git a/content/editor.js b/content/editor.js index 025f8937..744f1260 100644 --- a/content/editor.js +++ b/content/editor.js @@ -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); diff --git a/content/events.js b/content/events.js index d203aae6..bd8a0104 100644 --- a/content/events.js +++ b/content/events.js @@ -666,7 +666,7 @@ liberator.Events = function () //{{{ function (args) { XML.prettyPrinting = false; - var str = liberator.template.tabular(["Macro", "Keys"], [], liberator.events.getMacros(args)); + var str = liberator.template.tabular(["Macro", "Keys"], [], liberator.events.getMacros(args)); liberator.echo(str, liberator.commandline.FORCE_MULTILINE); }, { diff --git a/content/io.js b/content/io.js index 399d73f1..f648d829 100644 --- a/content/io.js +++ b/content/io.js @@ -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) {