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('')); }