From 534c8b94d24fc85ef0baee5bd938130c045db304 Mon Sep 17 00:00:00 2001 From: Corey Johnson Date: Wed, 21 Mar 2012 17:44:45 -0700 Subject: [PATCH] PEG :lipstick: --- src/atom/commands.pegjs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/atom/commands.pegjs b/src/atom/commands.pegjs index 74f52b110..e287fbcf6 100644 --- a/src/atom/commands.pegjs +++ b/src/atom/commands.pegjs @@ -17,10 +17,13 @@ address } substitution - = "s" _ "/" find:([^/]*) "/" replace:([^/]*) "/" _ options:[g]* { - return new Substitution(find.join(''), replace.join(''), options); + = "s" _ "/" find:pattern "/" replace:pattern "/" _ options:[g]* { + return new Substitution(find, replace, options); } +pattern + = pattern:[^/]* { return pattern.join('') } + integer = digits:[0-9]+ { return parseInt(digits.join('')); }