Using string f-formatting in Macro Panel messes up text highlighting in Macro Panel. So does regular expression’s r-prefix like re.compile(r'\W+')
On a similar note in Macro Panel, undoing and redoing a number of times there is unreliable; they gradually destroy the code and don’t accurately reproduce each undo state.