@@ -267,23 +267,35 @@ class DecorationManagerForPURL {
267
267
// this is a bit lossy, but better than noise
268
268
let typesListed = new Set < string > ( ) ;
269
269
for ( const alert of actionGroupedAlertSet ) {
270
- let extra = color ( '#888888' , ' ' ) ;
271
- if ( alert . props ?. alternatePackage ) {
272
- extra = `Possible intent: [${ name } $(link-external)](https://socket.dev/${ eco } /package/${ name } )`
273
- } else if ( alert . props ?. lastPublish ) {
274
- const lastPublish = new Date ( alert . props . lastPublish ) . toLocaleDateString ( ) ;
275
- extra = `Last published on: ${ lastPublish } ` ;
276
- } else if ( typesListed . has ( alert . type ) ) {
270
+ // vscode markdown wants some kind of text for the table layout
271
+ let extra = [ ]
272
+ let alternatePackage = alert . props ?. alternatePackage ;
273
+ let lastPublish = alert . props ?. lastPublish ;
274
+ let note = alert . props ?. note ;
275
+ if ( alternatePackage ) {
276
+ extra . push ( `Possible intent: [${ alternatePackage } $(link-external)](https://socket.dev/${ eco } /package/${ alternatePackage } )` )
277
+ }
278
+ if ( lastPublish ) {
279
+ const lastPublishStr = new Date ( alert . props . lastPublish ) . toLocaleDateString ( ) ;
280
+ extra . push ( `Last published on: ${ lastPublishStr } ` ) ;
281
+ }
282
+ if ( note ) {
283
+ extra . push ( `${ note } ` ) ;
284
+ }
285
+ if ( typesListed . has ( alert . type ) ) {
277
286
continue
278
287
}
288
+ if ( extra . length === 0 ) {
289
+ extra . push ( color ( '#888888' , ' ' ) ) ;
290
+ }
279
291
typesListed . add ( alert . type ) ;
280
292
const rowColor = {
281
293
'error' : '#ff8800' ,
282
294
'warn' : '#cc8800' ,
283
295
'monitor' : '#aaaa00' ,
284
296
'ignore' : '#888888' ,
285
297
} [ alert . action ]
286
- ret . push ( [ alert . action , alert . type , extra ] . map (
298
+ ret . push ( [ alert . action , alert . type , extra . join ( '<br>' ) . replaceAll ( / \r ? \n / g , '<br>' ) ] . map (
287
299
( str ) => color ( rowColor , str ) // color the action column
288
300
) . join ( ' | ' ) ) ;
289
301
}
0 commit comments