From 8e8ff310c1cd5f1d74dd935291917b1d7a4071b7 Mon Sep 17 00:00:00 2001 From: Sergey Krashevich Date: Fri, 12 Apr 2024 15:12:01 +0300 Subject: [PATCH] feat(mikrotik_router): format release notes for better readability This commit updates the handling of MikroTik RouterOS update release notes within the custom component. Specifically, it modifies the formatting of the release notes text by replacing instances of "*) " with "- ", in addition to converting newline characters to "
" HTML tags. This change aims to improve the readability of the release notes when displayed in the UI, making it easier for users to understand the changes in each RouterOS update. --- custom_components/mikrotik_router/update.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/mikrotik_router/update.py b/custom_components/mikrotik_router/update.py index cb8d007..55df8b7 100644 --- a/custom_components/mikrotik_router/update.py +++ b/custom_components/mikrotik_router/update.py @@ -97,7 +97,7 @@ class MikrotikRouterOSUpdate(MikrotikEntity, UpdateEntity): ) if response.status_code == 200: - return response.text.replace(chr(10), "
") + return response.text.replace(chr(10), "
").replace("*) ", "- ") except Exception as e: _LOGGER.warning("Failed to download release notes (%s)", e)