From: Mischa POSLAWSKY Date: Tue, 3 Mar 2015 22:53:07 +0000 (+0100) Subject: apl: omit title attribute if no description X-Git-Tag: v1.7~61 X-Git-Url: http://git.shiar.nl/sheet.git/commitdiff_plain/de5881cb3b9ffd4349986cb6653fc903ff737ada apl: omit title attribute if no description --- diff --git a/apl.plp b/apl.plp index 6fc7cad..478533f 100644 --- a/apl.plp +++ b/apl.plp @@ -51,8 +51,9 @@ for my $op (@ops) { [defined $html ? 'l4' : $ascii ? 'l5' : 'l1', $html // "#$codepoint"], ); printf( - defined $_ ? '%s' : '', - map { EscapeHTML($_) } split /\n/, $_, 2 + defined $_ ? '%s' : '', + map { !!$_->[1] && qq( title="$_->[1]"), $_->[0] } + [map { EscapeHTML($_) } split /\n/, $_, 2] ) for $monad, $dyad; print "\n"; }