From df1d65f6fc37951f120159132a489efb09d3d53b Mon Sep 17 00:00:00 2001 From: Henry Cox Date: Wed, 26 Mar 2025 10:09:27 -0400 Subject: [PATCH] MC/DC layout bug fix. Signed-off-by: Henry Cox --- bin/genhtml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/genhtml b/bin/genhtml index 9251a3c..e815df0 100755 --- a/bin/genhtml +++ b/bin/genhtml @@ -11309,8 +11309,12 @@ sub write_source_line(*$$$$$$$) if ($mc) { # space over far enough to line up with MC/DC extension column # remove the span and other HTML - (my $s = $br) =~ s/(<\/span>|)//g; + my $s = $br; + foreach my $tag ('a', 'span') { + $s =~ s/(<\/$tag>|<$tag.+?>)//g; + } $br .= ' ' x ($br_field_width - length($s)) . ' '; + die("unexpected lengths") unless $br_field_width >= length($s); } write_html($handle, "$html_continuation_leader$lineNumSpan" .