From 4fa2b5bcb71e1ae65ae5ac8fc9e15737eb3fcad9 Mon Sep 17 00:00:00 2001 From: sk89q Date: Thu, 27 Jan 2011 01:54:22 -0800 Subject: [PATCH] Fixed /script.js shortcut not stripping forward slashes. --- src/com/sk89q/worldedit/WorldEdit.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/sk89q/worldedit/WorldEdit.java b/src/com/sk89q/worldedit/WorldEdit.java index 587816f3d..85e9d9896 100644 --- a/src/com/sk89q/worldedit/WorldEdit.java +++ b/src/com/sk89q/worldedit/WorldEdit.java @@ -2120,10 +2120,11 @@ public class WorldEdit { if (split[0].equals("/,")) { split[0] = "//"; // Quick script shortcut - } else if (split[0].matches("^.+\\.js$")) { + } else if (split[0].matches("^/[^/].*\\.js$")) { String[] newSplit = new String[split.length + 1]; System.arraycopy(split, 0, newSplit, 1, split.length); newSplit[0] = "/cs"; + newSplit[1] = newSplit[1].substring(1); split = newSplit; }