Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Properly replace on Rakudo

  • Loading branch information...
commit 6edb9982ee47ccca6987ad0a1ef4b334c1b6d8f4 1 parent 56afde1
GlitchMr authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/Acme/Addslashes.pm
View
3  lib/Acme/Addslashes.pm
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.