diff --git a/misc/clipboard.py b/misc/clipboard.py index 206e1e6d..19690263 100644 --- a/misc/clipboard.py +++ b/misc/clipboard.py @@ -21,8 +21,16 @@ def __init__(self): self.tkroot = Tk() self.tkroot.withdraw() + def strip(self, text, trailing): + if text.endswith(trailing): + text = text[:-len(trailing)].strip() + return text + def copy_text(self, text): """ Copies the specified text into the clipboard. """ + text = text.strip() + text = self.strip(text, "(FIX)") + text = self.strip(text, "(FIXED)") self.tkroot.clipboard_clear() self.tkroot.clipboard_append(text.lower())