From 23dc941b67d06389679829a02262e224d1c2e186 Mon Sep 17 00:00:00 2001 From: "Mark E. Shoulson" Date: Mon, 1 Jun 2020 12:56:03 -0400 Subject: A bunch more emoji, including some new ones. Fix to emojitrans2.pl to keep the RE correct. --- emojitrans2.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'emojitrans2.pl') diff --git a/emojitrans2.pl b/emojitrans2.pl index 420129f..4ee9eac 100755 --- a/emojitrans2.pl +++ b/emojitrans2.pl @@ -52,6 +52,11 @@ BEGIN { binmode(STDOUT, ":utf8"); '˅' => 'Insert', # it'll do. ); + $specials = join "", keys %specials; + # Because of reasons + $specials =~ s/[]\\-]/\\$&/g; + $RE = qr{([[:alnum:]$specials]+)}; + sub splitup { my $arg=shift; local $_; @@ -73,7 +78,7 @@ unless (/^#/) { my $hold=$_; s///; s// /; - s({([][[:alnum:] _+:;%@>=`<,.^\$+#()?&!/|'"\\~*{}♫-]+)})(splitup($1))e; + s({($RE)})(splitup($1))e; if (length($1) > 7) { $_=$hold; s/^/### /; -- cgit v1.2.3