@@ -277,7 +277,7 @@ def print_search_results(results):
277277 print_out ("<yellow>Nothing found</yellow>" )
278278
279279
280- def print_status (status : Status , width : int = 80 ):
280+ def print_status (status : Status , width = 80 , render_mode = "" ):
281281 status_id = status .id
282282 in_reply_to_id = status .in_reply_to_id
283283 reblogged_by = status .account if status .reblog else None
@@ -299,7 +299,7 @@ def print_status(status: Status, width: int = 80):
299299 f"<yellow>{ time } </yellow>" ,
300300 )
301301
302- print_html (status .content , width )
302+ print_html (status .content , width , render_mode = render_mode )
303303
304304 if status .media_attachments :
305305 print_out ("\n Media:" )
@@ -320,8 +320,8 @@ def print_status(status: Status, width: int = 80):
320320 )
321321
322322
323- def print_html (text , width = 80 ):
324- markdown = "\n " .join (html_to_text (text , columns = width , highlight_tags = False ))
323+ def print_html (text , width = 80 , render_mode = "" ):
324+ markdown = "\n " .join (html_to_text (text , columns = width , render_mode = render_mode , highlight_tags = False ))
325325 print_out ("" )
326326 print_out (markdown )
327327
@@ -352,10 +352,10 @@ def print_poll(poll: Poll):
352352 print_out (poll_footer )
353353
354354
355- def print_timeline (items : List [Status ], width = 100 ):
355+ def print_timeline (items : List [Status ], width = 100 , render_mode = "" ):
356356 print_out ("─" * width )
357357 for item in items :
358- print_status (item , width )
358+ print_status (item , width , render_mode = render_mode )
359359 print_out ("─" * width )
360360
361361
@@ -367,7 +367,7 @@ def print_timeline(items: List[Status], width=100):
367367}
368368
369369
370- def print_notification (notification : Notification , width = 100 ):
370+ def print_notification (notification : Notification , width = 100 , render_mode = "" ):
371371 account = f"{ notification .account .display_name } @{ notification .account .acct } "
372372 msg = notification_msgs .get (notification .type )
373373 if msg is None :
@@ -376,10 +376,10 @@ def print_notification(notification: Notification, width=100):
376376 print_out ("─" * width )
377377 print_out (msg .format (account = account ))
378378 if notification .status :
379- print_status (notification .status , width )
379+ print_status (notification .status , width , render_mode = render_mode )
380380
381381
382- def print_notifications (notifications : List [Notification ], width = 100 ):
382+ def print_notifications (notifications : List [Notification ], render_mode = "" , width = 100 ):
383383 for notification in notifications :
384- print_notification (notification )
384+ print_notification (notification , render_mode = render_mode )
385385 print_out ("─" * width )
0 commit comments