Permalink
Browse files

Properly replace on Rakudo

  • Loading branch information...
xfix committed Jul 19, 2012
1 parent 56afde1 commit 6edb9982ee47ccca6987ad0a1ef4b334c1b6d8f4
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/Acme/Addslashes.pm
View
@@ -1,4 +1,5 @@
module Acme::Addslashes;
+my $soldius = "\c[COMBINING LONG SOLIDUS OVERLAY]";
sub addslashes(Str $string) is export {
- $string.subst: / <after . > /, "\c[COMBINING LONG SOLIDUS OVERLAY]", :g;
+ $string.subst: / (.) /, -> $/ { $0 ~ $soldius }, :g;
}

0 comments on commit 6edb998

Please sign in to comment.