kvui: actually fix [u] and [/u] appearing in copied hints (#4842)

This commit is contained in:
Emily
2025-04-08 12:06:19 -04:00
committed by GitHub
parent 60d6078e1f
commit ab2efc0c5c

View File

@@ -589,8 +589,7 @@ class HintLabel(RecycleDataViewBehavior, MDBoxLayout):
if self.entrance_text != "Vanilla"
else "", ". (", self.status_text.lower(), ")"))
temp = MarkupLabel(text).markup
text = "".join(
part for part in temp if not part.startswith(("[color", "[/color]", "[ref=", "[/ref]")))
text = "".join(part for part in temp if not part.startswith("["))
Clipboard.copy(escape_markup(text).replace("&", "&").replace("&bl;", "[").replace("&br;", "]"))
return self.parent.select_with_touch(self.index, touch)
else: