@@ -1182,33 +1182,26 @@ sub do_cmd_memberlineni{
11821182
11831183@col_aligns = (' <td>' , ' <td>' , ' <td>' , ' <td>' , ' <td>' );
11841184
1185+ %FontConversions = (' cdata' => ' tt class="cdata"' ,
1186+ ' character' => ' tt class="character"' ,
1187+ ' class' => ' tt class="class"' ,
1188+ ' command' => ' code' ,
1189+ ' constant' => ' tt class="constant"' ,
1190+ ' exception' => ' tt class="exception"' ,
1191+ ' file' => ' tt class="file"' ,
1192+ ' filenq' => ' tt class="file"' ,
1193+ ' kbd' => ' kbd' ,
1194+ ' member' => ' tt class="member"' ,
1195+ ' programopt' => ' b' ,
1196+ ' textrm' => ' ' ,
1197+ );
1198+
11851199sub fix_font{
11861200 # do a little magic on a font name to get the right behavior in the first
11871201 # column of the output table
11881202 my $font = @_ [0];
1189- if ($font eq ' textrm' ) {
1190- $font = ' ' ;
1191- }
1192- elsif ($font eq ' file' || $font eq ' filenq' ) {
1193- $font = ' tt class="file"' ;
1194- }
1195- elsif ($font eq ' member' ) {
1196- $font = ' tt class="member"' ;
1197- }
1198- elsif ($font eq ' class' ) {
1199- $font = ' tt class="class"' ;
1200- }
1201- elsif ($font eq ' constant' ) {
1202- $font = ' tt class="constant"' ;
1203- }
1204- elsif ($font eq ' kbd' ) {
1205- $font = ' kbd' ;
1206- }
1207- elsif ($font eq ' programopt' ) {
1208- $font = ' b' ;
1209- }
1210- elsif ($font eq ' exception' ) {
1211- $font = ' tt class="exception"' ;
1203+ if (defined $FontConversions {$font }) {
1204+ $font = $FontConversions {$font };
12121205 }
12131206 return $font ;
12141207}
0 commit comments