fix(seautils): fixed a typo in a function name
This commit is contained in:
parent
037a26deb0
commit
545106d496
1 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ from redbot.core.utils.views import SimpleMenu
|
||||||
def md(soup: BeautifulSoup, **options) -> Any | str:
|
def md(soup: BeautifulSoup, **options) -> Any | str:
|
||||||
return MarkdownConverter(**options).convert_soup(soup)
|
return MarkdownConverter(**options).convert_soup(soup)
|
||||||
|
|
||||||
def format_rfx_text(text: str, number: int) -> str:
|
def format_rfc_text(text: str, number: int) -> str:
|
||||||
one = re.sub(r"\(\.\/rfc(\d+)", r"(https://www.rfc-editor.org/rfc/rfc\1.html", text)
|
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)
|
two = re.sub(r"\((#(?:section|page)-\d+(?:.\d+)?)\)", f"(https://www.rfc-editor.org/rfc/rfc{number}.html\1)", one)
|
||||||
three: str = re.sub(r"\n{3,}", "\n\n", two)
|
three: str = re.sub(r"\n{3,}", "\n\n", two)
|
||||||
|
@ -215,7 +215,7 @@ class SeaUtils(commands.Cog):
|
||||||
pre_tags = soup.find_all('pre')
|
pre_tags = soup.find_all('pre')
|
||||||
content: list[Embed | str] = []
|
content: list[Embed | str] = []
|
||||||
for pre_tag in pre_tags:
|
for pre_tag in pre_tags:
|
||||||
text = format_rfx_text(md(pre_tag), number)
|
text = format_rfc_text(md(pre_tag), number)
|
||||||
if len(text) > 4096:
|
if len(text) > 4096:
|
||||||
pagified_text = cf.pagify(text, delims=["\n\n"], page_length=4096)
|
pagified_text = cf.pagify(text, delims=["\n\n"], page_length=4096)
|
||||||
for page in pagified_text:
|
for page in pagified_text:
|
||||||
|
|
Loading…
Reference in a new issue