Skip to content

Commit

Permalink
return a percent if already a percent
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Jordan committed Jul 26, 2024
1 parent 1e4afb0 commit b07ef6c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions macros/ui/niceTables.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1586,6 +1586,7 @@ sub getPTXthickness {

sub getWidthPercent {
my $width = shift;
return $width if (substr($width, -1) eq '%');
return $width * 100 . '%' if ($width =~ /^0*(0(\.\d*)?|1(\.0*)?)$/);
my $x = 0;
my $unit = 'cm';
Expand Down

0 comments on commit b07ef6c

Please sign in to comment.