From b9f0dbf98a5272d81e39c8c62788ccc47cda36dc Mon Sep 17 00:00:00 2001 From: Seaswimmer Date: Tue, 28 May 2024 21:56:43 -0400 Subject: [PATCH] fix(seautils): removed big gap at the bottom of rfc embeds --- seautils/seautils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/seautils/seautils.py b/seautils/seautils.py index 6b2618a..b37bdd6 100644 --- a/seautils/seautils.py +++ b/seautils/seautils.py @@ -32,7 +32,8 @@ def md(soup: BeautifulSoup, **options) -> Any | str: def convert_rfc_references(text: str, number: int) -> str: one = re.sub(r"\(\.\/rfc(\d+)", r"(https://www.rfc-editor.org/rfc/rfc\1.html", text) two = re.sub(r"\((#(?:section|page)-\d+(?:.\d+)?)\)", f"(https://www.rfc-editor.org/rfc/rfc{number}.html\1)", one) - return two + three: str = re.sub(r"\n{3,}", "\n\n", two) + return three class SeaUtils(commands.Cog): """A collection of random utilities."""