@@ -135,15 +135,17 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
135
135
}
136
136
137
137
renderElement ( element : MarkerTableItem , index : number , templateData : IMarkerCodeColumnTemplateData , height : number | undefined ) : void {
138
- if ( element . marker . source && element . marker . code ) {
139
- templateData . codeColumn . classList . toggle ( 'code-link' , typeof element . marker . code !== 'string' ) ;
140
- DOM . show ( templateData . codeLabel . element ) ;
138
+ templateData . codeColumn . classList . remove ( 'code-label' ) ;
139
+ templateData . codeColumn . classList . remove ( 'code-link' ) ;
141
140
141
+ if ( element . marker . source && element . marker . code ) {
142
142
if ( typeof element . marker . code === 'string' ) {
143
+ templateData . codeColumn . classList . add ( 'code-label' ) ;
143
144
templateData . codeColumn . title = `${ element . marker . source } (${ element . marker . code } )` ;
144
145
templateData . sourceLabel . set ( element . marker . source , element . sourceMatches ) ;
145
146
templateData . codeLabel . set ( element . marker . code , element . codeMatches ) ;
146
147
} else {
148
+ templateData . codeColumn . classList . add ( 'code-link' ) ;
147
149
templateData . codeColumn . title = `${ element . marker . source } (${ element . marker . code . value } )` ;
148
150
templateData . sourceLabel . set ( element . marker . source , element . sourceMatches ) ;
149
151
@@ -159,7 +161,6 @@ class MarkerCodeColumnRenderer implements ITableRenderer<MarkerTableItem, IMarke
159
161
} else {
160
162
templateData . codeColumn . title = '' ;
161
163
templateData . sourceLabel . set ( '-' ) ;
162
- DOM . hide ( templateData . codeLabel . element ) ;
163
164
}
164
165
}
165
166
0 commit comments