@@ -555,57 +555,57 @@ sub format_matrix_HTML {
555
555
my ($rows , $cols ) = (scalar (@{$array }), scalar (@{ $array -> [0] }));
556
556
my $HTML = " " ;
557
557
my $class = ' class="ans_array_cell"' ;
558
- my $cell = " display:table-cell;vertical-align:middle;" ;
558
+ my $cell = " display:table-cell;vertical-align:middle;text-align:center; " ;
559
559
my $pad = " padding:4px 0;" ;
560
- if ($sep ) { $sep = ' <span class="ans_array_sep" style="' . $cell . ' padding:0 2px">' . $sep . ' </span >' }
561
- else { $sep = ' <span class="ans_array_sep" style="' . $cell . ' width:8px"></span >' }
562
- $sep = ' </span >' . $sep . ' <span ' . $class . ' style="' . $cell . $pad . ' ">' ;
560
+ if ($sep ) { $sep = ' <div class="ans_array_sep" style="' . $cell . ' padding:0 2px">' . $sep . ' </div >' }
561
+ else { $sep = ' <div class="ans_array_sep" style="' . $cell . ' width:8px"></div >' }
562
+ $sep = ' </div >' . $sep . ' <div ' . $class . ' style="' . $cell . $pad . ' ">' ;
563
563
564
564
if ($options {top_labels }) {
565
565
$HTML .=
566
- ' <span style="display:table-row"><span '
566
+ ' <div style="display:table-row"><div '
567
567
. $class
568
568
. ' style="'
569
569
. $cell
570
570
. $pad . ' ">'
571
571
. join ($sep , @{ $options {top_labels } })
572
- . ' </span ></span >' ;
572
+ . ' </div ></div >' ;
573
573
}
574
574
foreach my $i (0 .. $rows - 1) {
575
575
$HTML .=
576
- ' <span style="display:table-row"><span '
576
+ ' <div style="display:table-row"><div '
577
577
. $class
578
578
. ' style="'
579
579
. $cell
580
580
. $pad . ' ">'
581
581
. join ($sep , EVALUATE(@{ $array -> [$i ] }))
582
- . ' </span ></span >' ;
582
+ . ' </div ></div >' ;
583
583
}
584
- $HTML = ' <span class="ans_array_table" style="display:inline-table; vertical-align:middle">' . $HTML . ' </span >' ;
584
+ $HTML = ' <div class="ans_array_table" style="display:inline-table; vertical-align:middle">' . $HTML . ' </div >' ;
585
585
$open = $self -> format_delimiter($open , $rows , $options {tth_delims });
586
586
$close = $self -> format_delimiter($close , $rows , $options {tth_delims });
587
587
if ($open ne ' ' || $close ne ' ' ) {
588
588
my $delim = " display:inline-block; vertical-align:middle;" ;
589
589
$HTML =
590
- ' <span class="ans_array_open" style="'
590
+ ' <div class="ans_array_open" style="'
591
591
. $delim
592
592
. ' margin-right:4px">'
593
593
. $open
594
- . ' </span >'
594
+ . ' </div >'
595
595
. $HTML
596
- . ' <span class="ans_array_close" style="'
596
+ . ' <div class="ans_array_close" style="'
597
597
. $delim
598
598
. ' margin-left:4px">'
599
599
. $close
600
- . ' </span >' ;
600
+ . ' </div >' ;
601
601
}
602
- return ' <span class="ans_array" style="display:inline-block;vertical-align:.5ex"'
602
+ return ' <div class="ans_array" style="display:inline-block;vertical-align:.5ex"'
603
603
. ($options {ans_last_name }
604
604
? qq{ data-feedback-insert-element="$options {ans_last_name}" data-feedback-insert-method="append_content"}
605
605
: ' ' )
606
606
. ' >'
607
607
. $HTML
608
- . ' </span >' ;
608
+ . ' </div >' ;
609
609
}
610
610
611
611
sub EVALUATE {
0 commit comments