aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/cogs/doc/cog.py2
-rw-r--r--bot/cogs/doc/parsing.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/bot/cogs/doc/cog.py b/bot/cogs/doc/cog.py
index 4e4f3b737..36fbe9010 100644
--- a/bot/cogs/doc/cog.py
+++ b/bot/cogs/doc/cog.py
@@ -270,7 +270,7 @@ class DocCog(commands.Cog):
self.bot.stats.incr(f"doc_fetches.{symbol_obj.package.lower()}")
signatures = scraped_html[0]
permalink = symbol_obj.url
- description = truncate_markdown(markdownify(scraped_html[1], url=permalink), permalink, 1000)
+ description = truncate_markdown(markdownify(scraped_html[1], url=permalink), 1000)
description = WHITESPACE_AFTER_NEWLINES_RE.sub('', description)
if signatures is None:
# If symbol is a module, don't show signature.
diff --git a/bot/cogs/doc/parsing.py b/bot/cogs/doc/parsing.py
index 010826a96..3b79e0a93 100644
--- a/bot/cogs/doc/parsing.py
+++ b/bot/cogs/doc/parsing.py
@@ -83,7 +83,7 @@ def find_all_children_until_tag(
return text
-def truncate_markdown(markdown: str, permalink: str, max_length: int) -> str:
+def truncate_markdown(markdown: str, max_length: int) -> str:
"""
Truncate `markdown` to be at most `max_length` characters.
@@ -108,7 +108,7 @@ def truncate_markdown(markdown: str, permalink: str, max_length: int) -> str:
if markdown.count("```") % 2:
codeblock_start = markdown.rfind('```py')
markdown = markdown[:codeblock_start].rstrip()
- markdown += f"... [read more]({permalink})"
+ markdown += "... read more"
return markdown