latin: unistrokes circles matched separately
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 14 May 2022 12:12:55 +0000 (14:12 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 28 May 2022 17:35:56 +0000 (19:35 +0200)
Code cleanup to silence perl warning about redundant sprintf argument.

writing-latn.inc.pl

index da917a2d1d37da807a8285770eb41909cd783676..a2dd4b44d09972b0671fbdaa74958be720fa38d7 100644 (file)
@@ -242,8 +242,9 @@ unistrokes => {
        list => [
                map { '<svg width="14" height="16" viewBox="-1 -1 8 10">'.$_.'</svg>' }
                map {
-                       sprintf('<circle cx="%s" cy="%s" r="1"/>', m/\AM(\d+),(\d+)(.?)/) . # start point
-                       (!!$3 && qq(<path d="$_"/>))
+                       my ($x, $y, $next) = m/\AM(\d+),(\d+)(.)?/;
+                       sprintf('<circle cx="%s" cy="%s" r="1"/>', $x, $y) . # start point
+                       (defined $next && qq(<path d="$_"/>))
                }
                'M3,8 V0',
                'M0,0 6,4 0,8',