@@ -267,23 +267,35 @@ class DecorationManagerForPURL {
267267 // this is a bit lossy, but better than noise
268268 let typesListed = new Set < string > ( ) ;
269269 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 ) ) {
277286 continue
278287 }
288+ if ( extra . length === 0 ) {
289+ extra . push ( color ( '#888888' , ' ' ) ) ;
290+ }
279291 typesListed . add ( alert . type ) ;
280292 const rowColor = {
281293 'error' : '#ff8800' ,
282294 'warn' : '#cc8800' ,
283295 'monitor' : '#aaaa00' ,
284296 'ignore' : '#888888' ,
285297 } [ 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 (
287299 ( str ) => color ( rowColor , str ) // color the action column
288300 ) . join ( ' | ' ) ) ;
289301 }
0 commit comments