diff --git a/helpers/ui.py b/helpers/ui.py index c81452f..02022a6 100644 --- a/helpers/ui.py +++ b/helpers/ui.py @@ -3133,11 +3133,22 @@ class DetailsDialog(GenericDialog): for row in response.data: self.store.append(row + [Pango.Weight.BOLD]) self.view.set_model(self.store) - self.description.set_text(response.description) + + text = response.description + reg = r"\s(www\.*?)" + text = re.sub(reg, " http://" + r"\1", text) + reg2 = r"(http.*?)([ ,\r\n]|$)" + text = re.sub(reg2, comp(r"\1")+r"\2", text) + + self.description.set_markup(text) self.success = response.success GLib.idle_add(self._load) +def comp(string): + return f'{string}' + + class ModDialog(GenericDialog): def __init__(self, record: str): msg = "Enter/double click a row to open in Steam Workshop."